(* ::Package:: *)

(* ::Title:: *)
(*Integration problems of the form *)
(*Sec[c+d x]^m (A+B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Section:: *)
(*Sec[c+d x]^m (a+b Sec[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (a+b Sec[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^4*(a + b*Sec[c + d*x])^2, x, 6, (3*a*b*ArcTanh[Sin[c + d*x]])/(4*d) + (2*(5*a^2 + 4*b^2)*Tan[c + d*x])/(15*d) + (3*a*b*Sec[c + d*x]*Tan[c + d*x])/(4*d) + ((5*a^2 + 4*b^2)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (a*b*Sec[c + d*x]^3*Tan[c + d*x])/(2*d) + (b^2*Sec[c + d*x]^4*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^3*(a + b*Sec[c + d*x])^2, x, 5, ((4*a^2 + 3*b^2)*ArcTanh[Sin[c + d*x]])/(8*d) + (4*a*b*Tan[c + d*x])/(3*d) + ((4*a^2 + 3*b^2)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (2*a*b*Sec[c + d*x]^2*Tan[c + d*x])/(3*d) + (b^2*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2, x, 4, (a*b*ArcTanh[Sin[c + d*x]])/d + ((3*a^2 + 2*b^2)*Tan[c + d*x])/(3*d) + (a*b*Sec[c + d*x]*Tan[c + d*x])/d + (b^2*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^1*(a + b*Sec[c + d*x])^2, x, 3, ((2*a^2 + b^2)*ArcTanh[Sin[c + d*x]])/(2*d) + (2*a*b*Tan[c + d*x])/d + (b^2*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^0*(a + b*Sec[c + d*x])^2, x, 2, a^2*x + (2*a*b*ArcTanh[Sin[c + d*x]])/d + (b^2*Tan[c + d*x])/d}
{Cos[c + d*x]^1*(a + b*Sec[c + d*x])^2, x, 3, 2*a*b*x + (b^2*ArcTanh[Sin[c + d*x]])/d + (a^2*Sin[c + d*x])/d}
{Cos[c + d*x]^2*(a + b*Sec[c + d*x])^2, x, 3, (1/2)*(a^2 + 2*b^2)*x + (2*a*b*Sin[c + d*x])/d + (a^2*Cos[c + d*x]*Sin[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2, x, 4, a*b*x + ((2*a^2 + 3*b^2)*Sin[c + d*x])/(3*d) + (a*b*Cos[c + d*x]*Sin[c + d*x])/d + (a^2*Cos[c + d*x]^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2, x, 5, (1/8)*(3*a^2 + 4*b^2)*x + (4*a*b*Sin[c + d*x])/(3*d) + ((3*a^2 + 4*b^2)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (2*a*b*Cos[c + d*x]^2*Sin[c + d*x])/(3*d) + (a^2*Cos[c + d*x]^3*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(a + b*Sec[c + d*x])^2, x, 6, (3*a*b*x)/4 + (2*(4*a^2 + 5*b^2)*Sin[c + d*x])/(15*d) + (3*a*b*Cos[c + d*x]*Sin[c + d*x])/(4*d) + ((4*a^2 + 5*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (a*b*Cos[c + d*x]^3*Sin[c + d*x])/(2*d) + (a^2*Cos[c + d*x]^4*Sin[c + d*x])/(5*d)}


{Sec[c + d*x]^3*(a + b*Sec[c + d*x])^3, x, 6, (a*(4*a^2 + 9*b^2)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*b*(15*a^2 + 4*b^2)*Tan[c + d*x])/(15*d) + (a*(4*a^2 + 9*b^2)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (b*(15*a^2 + 4*b^2)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (11*a*b^2*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (b^2*Sec[c + d*x]^3*(a + b*Sec[c + d*x])*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(a + b*Sec[c + d*x])^3, x, 6, (3*b*(4*a^2 + b^2)*ArcTanh[Sin[c + d*x]])/(8*d) + (a*(2*a^2 + 13*b^2)*Tan[c + d*x])/(8*d) + ((2*a^2 + 3*b^2)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(8*d) + (a*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(4*d) + ((a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^1*(a + b*Sec[c + d*x])^3, x, 5, (a*(2*a^2 + 3*b^2)*ArcTanh[Sin[c + d*x]])/(2*d) + (b*(11*a^2 + 4*b^2)*Tan[c + d*x])/(6*d) + (5*a*b*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (b*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^0*(a + b*Sec[c + d*x])^3, x, 4, a^3*x + (b*(6*a^2 + b^2)*ArcTanh[Sin[c + d*x]])/(2*d) + (5*a*b^2*Tan[c + d*x])/(2*d) + (b^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^1*(a + b*Sec[c + d*x])^3, x, 4, 3*a^2*b*x + (3*a*b^2*ArcTanh[Sin[c + d*x]])/d + (a*(a^2 - b^2)*Sin[c + d*x])/d + (b^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/d}
{Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3, x, 4, (1/2)*a*(a^2 + 6*b^2)*x + (b^3*ArcTanh[Sin[c + d*x]])/d + (5*a^2*b*Sin[c + d*x])/(2*d) + (a^2*(b + a*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(a + b*Sec[c + d*x])^3, x, 4, (1/2)*b*(3*a^2 + 2*b^2)*x + (a*(2*a^2 + 9*b^2)*Sin[c + d*x])/(3*d) + (7*a^2*b*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (a^2*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(a + b*Sec[c + d*x])^3, x, 5, (3/8)*a*(a^2 + 4*b^2)*x + (b*(2*a^2 + b^2)*Sin[c + d*x])/d + (3*a*(a^2 + 4*b^2)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (3*a^2*b*Cos[c + d*x]^2*Sin[c + d*x])/(4*d) + (a^2*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(a + b*Sec[c + d*x])^3, x, 6, (1/8)*b*(9*a^2 + 4*b^2)*x + (2*a*(4*a^2 + 15*b^2)*Sin[c + d*x])/(15*d) + (b*(9*a^2 + 4*b^2)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*(4*a^2 + 15*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (11*a^2*b*Cos[c + d*x]^3*Sin[c + d*x])/(20*d) + (a^2*Cos[c + d*x]^4*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^6*(a + b*Sec[c + d*x])^3, x, 7, (1/16)*a*(5*a^2 + 18*b^2)*x + (2*b*(12*a^2 + 5*b^2)*Sin[c + d*x])/(15*d) + (a*(5*a^2 + 18*b^2)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + (b*(12*a^2 + 5*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (a*(5*a^2 + 18*b^2)*Cos[c + d*x]^3*Sin[c + d*x])/(24*d) + (13*a^2*b*Cos[c + d*x]^4*Sin[c + d*x])/(30*d) + (a^2*Cos[c + d*x]^5*(a + b*Sec[c + d*x])*Sin[c + d*x])/(6*d)}


{Sec[c + d*x]^3*(a + b*Sec[c + d*x])^4, x, 7, ((8*a^4 + 36*a^2*b^2 + 5*b^4)*ArcTanh[Sin[c + d*x]])/(16*d) + (8*a*b*(5*a^2 + 4*b^2)*Tan[c + d*x])/(15*d) + ((8*a^4 + 36*a^2*b^2 + 5*b^4)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + (4*a*b*(5*a^2 + 4*b^2)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (b^2*(104*a^2 + 25*b^2)*Sec[c + d*x]^3*Tan[c + d*x])/(120*d) + (7*a*b^2*Sec[c + d*x]^3*(a + b*Sec[c + d*x])*Tan[c + d*x])/(15*d) + (b^2*Sec[c + d*x]^3*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(6*d)}
{Sec[c + d*x]^2*(a + b*Sec[c + d*x])^4, x, 7, (a*b*(4*a^2 + 3*b^2)*ArcTanh[Sin[c + d*x]])/(2*d) + ((6*a^4 + 83*a^2*b^2 + 16*b^4)*Tan[c + d*x])/(30*d) + (a*(6*a^2 + 29*b^2)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(30*d) + ((3*a^2 + 4*b^2)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(15*d) + (a*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(5*d) + ((a + b*Sec[c + d*x])^4*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^1*(a + b*Sec[c + d*x])^4, x, 6, ((8*a^4 + 24*a^2*b^2 + 3*b^4)*ArcTanh[Sin[c + d*x]])/(8*d) + (5*a*b*(10*a^2 + 11*b^2)*Tan[c + d*x])/(24*d) + (b*(26*a^2 + 9*b^2)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(24*d) + (7*a*b*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (b*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^0*(a + b*Sec[c + d*x])^4, x, 5, a^4*x + (2*a*b*(2*a^2 + b^2)*ArcTanh[Sin[c + d*x]])/d + (b^2*(13*a^2 + 2*b^2)*Tan[c + d*x])/(3*d) + (4*a*b^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(3*d) + (b^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^1*(a + b*Sec[c + d*x])^4, x, 5, 4*a^3*b*x + (b^2*(12*a^2 + b^2)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(2*a^2 - b^2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(2*d) + (b^2*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) - (a*b*(2*a^2 - 7*b^2)*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^2*(a + b*Sec[c + d*x])^4, x, 5, (a^4*x)/2 + 6*a^2*b^2*x + (4*a*b^3*ArcTanh[Sin[c + d*x]])/d + (3*a^2*b*(a + b*Sec[c + d*x])*Sin[c + d*x])/d + (a^2*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) - (b^2*(7*a^2 - 2*b^2)*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(a + b*Sec[c + d*x])^4, x, 5, 2*a*b*(a^2 + 2*b^2)*x + (b^4*ArcTanh[Sin[c + d*x]])/d + (a^2*(2*a^2 + 13*b^2)*Sin[c + d*x])/(3*d) + (4*a^2*b*(b + a*Cos[c + d*x])*Sin[c + d*x])/(3*d) + (a^2*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(a + b*Sec[c + d*x])^4, x, 5, (1/8)*(3*a^4 + 24*a^2*b^2 + 8*b^4)*x + (4*a*b*(2*a^2 + 3*b^2)*Sin[c + d*x])/(3*d) + (a^2*(9*a^2 + 46*b^2)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + (5*a^2*b*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(6*d) + (a^2*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(a + b*Sec[c + d*x])^4, x, 6, (1/2)*a*b*(3*a^2 + 4*b^2)*x + ((8*a^4 + 60*a^2*b^2 + 15*b^4)*Sin[c + d*x])/(15*d) + (a*b*(3*a^2 + 4*b^2)*Cos[c + d*x]*Sin[c + d*x])/(2*d) + (2*a^2*(2*a^2 + 9*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (3*a^2*b*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d) + (a^2*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^6*(a + b*Sec[c + d*x])^4, x, 7, (1/16)*(5*a^4 + 36*a^2*b^2 + 8*b^4)*x + (8*a*b*(4*a^2 + 5*b^2)*Sin[c + d*x])/(15*d) + ((5*a^4 + 36*a^2*b^2 + 8*b^4)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + (4*a*b*(4*a^2 + 5*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (a^2*(25*a^2 + 104*b^2)*Cos[c + d*x]^3*Sin[c + d*x])/(120*d) + (7*a^2*b*Cos[c + d*x]^4*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d) + (a^2*Cos[c + d*x]^5*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(6*d)}


{(a + b*Sec[c + d*x])^5, x, 6, a^5*x + (b*(40*a^4 + 40*a^2*b^2 + 3*b^4)*ArcTanh[Sin[c + d*x]])/(8*d) + (a*b^2*(154*a^2 + 71*b^2)*Tan[c + d*x])/(24*d) + (b^2*(58*a^2 + 9*b^2)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(24*d) + (11*a*b^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (b^2*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^5/(a + b*Sec[c + d*x]), x, 7, -((a*(2*a^2 + b^2)*ArcTanh[Sin[c + d*x]])/(2*b^4*d)) - (2*a^4*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) + ((3*a^2 + 2*b^2)*Tan[c + d*x])/(3*b^3*d) - (a*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*d) + (Sec[c + d*x]^2*Tan[c + d*x])/(3*b*d)}
{Sec[c + d*x]^4/(a + b*Sec[c + d*x]), x, 6, ((2*a^2 + b^2)*ArcTanh[Sin[c + d*x]])/(2*b^3*d) + (2*a^3*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) - (a*Tan[c + d*x])/(b^2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*b*d)}
{Sec[c + d*x]^3/(a + b*Sec[c + d*x]), x, 6, -((a*ArcTanh[Sin[c + d*x]])/(b^2*d)) - (2*a^2*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + Tan[c + d*x]/(b*d)}
{Sec[c + d*x]^2/(a + b*Sec[c + d*x]), x, 4, ArcTanh[Sin[c + d*x]]/(b*d) + (2*a*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b*Sqrt[a^2 - b^2]*d)}
{Sec[c + d*x]^1/(a + b*Sec[c + d*x]), x, 2, -((2*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*d))}
{Sec[c + d*x]^0/(a + b*Sec[c + d*x]), x, 2, x/a + (2*b*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2]*d)}
{Cos[c + d*x]^1/(a + b*Sec[c + d*x]), x, 4, -((b*x)/a^2) - (2*b^2*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) + Sin[c + d*x]/(a*d)}
{Cos[c + d*x]^2/(a + b*Sec[c + d*x]), x, 5, ((a^2 + 2*b^2)*x)/(2*a^3) + (2*b^3*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d) - (b*Sin[c + d*x])/(a^2*d) + (Cos[c + d*x]*Sin[c + d*x])/(2*a*d)}
{Cos[c + d*x]^3/(a + b*Sec[c + d*x]), x, 6, -((b*(a^2 + 2*b^2)*x)/(2*a^4)) - (2*b^4*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*Sqrt[a^2 - b^2]*d) + ((2*a^2 + 3*b^2)*Sin[c + d*x])/(3*a^3*d) - (b*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*d) + (Cos[c + d*x]^2*Sin[c + d*x])/(3*a*d)}
{Cos[c + d*x]^4/(a + b*Sec[c + d*x]), x, 7, ((3*a^4 + 4*a^2*b^2 + 8*b^4)*x)/(8*a^5) + (2*b^5*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*Sqrt[a^2 - b^2]*d) - (b*(2*a^2 + 3*b^2)*Sin[c + d*x])/(3*a^4*d) + ((3*a^2 + 4*b^2)*Cos[c + d*x]*Sin[c + d*x])/(8*a^3*d) - (b*Cos[c + d*x]^2*Sin[c + d*x])/(3*a^2*d) + (Cos[c + d*x]^3*Sin[c + d*x])/(4*a*d)}


{Sec[c + d*x]^5/(a + b*Sec[c + d*x])^2, x, 7, ((6*a^2 + b^2)*ArcTanh[Sin[c + d*x]])/(2*b^4*d) + (2*a^3*(3*a^2 - 4*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) - (a*(3*a^2 - 2*b^2)*Tan[c + d*x])/(b^3*(a^2 - b^2)*d) + ((3*a^2 - b^2)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)*d) - (a^2*Sec[c + d*x]^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^4/(a + b*Sec[c + d*x])^2, x, 6, -((2*a*ArcTanh[Sin[c + d*x]])/(b^3*d)) - (2*a^2*(2*a^2 - 3*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) + ((2*a^2 - b^2)*Tan[c + d*x])/(b^2*(a^2 - b^2)*d) - (a^2*Sec[c + d*x]*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3/(a + b*Sec[c + d*x])^2, x, 5, ArcTanh[Sin[c + d*x]]/(b^2*d) + (2*a*(a^2 - 2*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) - (a^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2/(a + b*Sec[c + d*x])^2, x, 4, (2*b*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d) + (a*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1/(a + b*Sec[c + d*x])^2, x, 4, -((2*a*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d)) - (b*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0/(a + b*Sec[c + d*x])^2, x, 3, x/a^2 + (2*b*(2*a^2 - b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d) + (b^2*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1/(a + b*Sec[c + d*x])^2, x, 5, -((2*b*x)/a^3) - (2*b^2*(3*a^2 - 2*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) + ((a^2 - 2*b^2)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d) + (b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2/(a + b*Sec[c + d*x])^2, x, 6, ((a^2 + 6*b^2)*x)/(2*a^4) + (2*b^3*(4*a^2 - 3*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(3/2)*d) - (b*(2*a^2 - 3*b^2)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2 - 3*b^2)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)*d) + (b^2*Cos[c + d*x]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^3/(a + b*Sec[c + d*x])^2, x, 7, -((b*(a^2 + 4*b^2)*x)/a^5) - (2*b^4*(5*a^2 - 4*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(3/2)*d) + ((2*a^4 + 7*a^2*b^2 - 12*b^4)*Sin[c + d*x])/(3*a^4*(a^2 - b^2)*d) - (b*(a^2 - 2*b^2)*Cos[c + d*x]*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2 - 4*b^2)*Cos[c + d*x]^2*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + (b^2*Cos[c + d*x]^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^5/(a + b*Sec[c + d*x])^3, x, 7, -((3*a*ArcTanh[Sin[c + d*x]])/(b^4*d)) - (3*a^2*(2*a^4 - 5*a^2*b^2 + 4*b^4)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) + ((6*a^4 - 11*a^2*b^2 + 2*b^4)*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - (a^2*Sec[c + d*x]^2*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (3*a^2*(a^2 - 2*b^2)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^4/(a + b*Sec[c + d*x])^3, x, 6, ArcTanh[Sin[c + d*x]]/(b^3*d) + (a*(2*a^4 - 5*a^2*b^2 + 6*b^4)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) - (a^2*Sec[c + d*x]*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (a^2*(2*a^2 - 5*b^2)*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3/(a + b*Sec[c + d*x])^3, x, 5, -(((a^2 + 2*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d)) - (a^2*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (a*(a^2 - 4*b^2)*Tan[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2/(a + b*Sec[c + d*x])^3, x, 5, (3*a*b*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) + (a*Tan[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((a^2 + 2*b^2)*Tan[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1/(a + b*Sec[c + d*x])^3, x, 5, -(((2*a^2 + b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d)) - (b*Tan[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (3*a*b*Tan[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0/(a + b*Sec[c + d*x])^3, x, 4, x/a^3 + (b*(6*a^4 - 5*a^2*b^2 + 2*b^4)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d) + (b^2*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b^2*(5*a^2 - 2*b^2)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1/(a + b*Sec[c + d*x])^3, x, 6, -((3*b*x)/a^4) - (3*b^2*(4*a^4 - 5*a^2*b^2 + 2*b^4)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) + ((2*a^4 - 11*a^2*b^2 + 6*b^4)*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b^2*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (3*b^2*(2*a^2 - b^2)*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2/(a + b*Sec[c + d*x])^3, x, 7, ((a^2 + 12*b^2)*x)/(2*a^5) + (b^3*(20*a^4 - 29*a^2*b^2 + 12*b^4)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(5/2)*d) - (3*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^2*d) + ((a^4 - 10*a^2*b^2 + 6*b^4)*Cos[c + d*x]*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b^2*Cos[c + d*x]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b^2*(7*a^2 - 4*b^2)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^6/(a + b*Sec[c + d*x])^4, x, 8, -((4*a*ArcTanh[Sin[c + d*x]])/(b^5*d)) - (a^2*(8*a^6 - 28*a^4*b^2 + 35*a^2*b^4 - 20*b^6)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(7/2)*d) + ((24*a^6 - 68*a^4*b^2 + 65*a^2*b^4 - 6*b^6)*Tan[c + d*x])/(6*b^4*(a^2 - b^2)^3*d) - (a^2*Sec[c + d*x]^3*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - (a^2*(4*a^2 - 9*b^2)*Sec[c + d*x]^2*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - (a^2*(4*a^4 - 11*a^2*b^2 + 12*b^4)*Sec[c + d*x]*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^5/(a + b*Sec[c + d*x])^4, x, 7, ArcTanh[Sin[c + d*x]]/(b^4*d) + (a*(2*a^6 - 7*a^4*b^2 + 8*a^2*b^4 - 8*b^6)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(7/2)*d) - (a^2*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - (a^2*(3*a^2 - 8*b^2)*Sec[c + d*x]*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - (a^2*(6*a^4 - 17*a^2*b^2 + 26*b^4)*Tan[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^4/(a + b*Sec[c + d*x])^4, x, 6, (b*(3*a^2 + 2*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) - (a^2*Sec[c + d*x]*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - (a^2*(2*a^2 - 7*b^2)*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (a*(2*a^4 - 5*a^2*b^2 + 18*b^4)*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3/(a + b*Sec[c + d*x])^4, x, 6, -((a*(a^2 + 4*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) - (a^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (a*(a^2 - 6*b^2)*Tan[c + d*x])/(6*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((a^4 - 10*a^2*b^2 - 6*b^4)*Tan[c + d*x])/(6*b*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2/(a + b*Sec[c + d*x])^4, x, 6, (b*(4*a^2 + b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) + (a*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((2*a^2 + 3*b^2)*Tan[c + d*x])/(6*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (a*(2*a^2 + 13*b^2)*Tan[c + d*x])/(6*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1/(a + b*Sec[c + d*x])^4, x, 6, -((a*(2*a^2 + 3*b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) - (b*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - (5*a*b*Tan[c + d*x])/(6*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - (b*(11*a^2 + 4*b^2)*Tan[c + d*x])/(6*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0/(a + b*Sec[c + d*x])^4, x, 5, x/a^4 + (b*(8*a^6 - 8*a^4*b^2 + 7*a^2*b^4 - 2*b^6)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(7/2)*d) + (b^2*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (b^2*(8*a^2 - 3*b^2)*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (b^2*(26*a^4 - 17*a^2*b^2 + 6*b^4)*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1/(a + b*Sec[c + d*x])^4, x, 7, -((4*b*x)/a^5) - (b^2*(20*a^6 - 35*a^4*b^2 + 28*a^2*b^4 - 8*b^6)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(7/2)*d) + ((6*a^6 - 65*a^4*b^2 + 68*a^2*b^4 - 24*b^6)*Sin[c + d*x])/(6*a^4*(a^2 - b^2)^3*d) + (b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (b^2*(9*a^2 - 4*b^2)*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (b^2*(12*a^4 - 11*a^2*b^2 + 4*b^4)*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2/(a + b*Sec[c + d*x])^4, x, 8, ((a^2 + 20*b^2)*x)/(2*a^6) + (b^3*(40*a^6 - 84*a^4*b^2 + 69*a^2*b^4 - 20*b^6)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^6*(a^2 - b^2)^(7/2)*d) - (b*(24*a^6 - 146*a^4*b^2 + 167*a^2*b^4 - 60*b^6)*Sin[c + d*x])/(6*a^5*(a^2 - b^2)^3*d) + ((a^6 - 23*a^4*b^2 + 27*a^2*b^4 - 10*b^6)*Cos[c + d*x]*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^3*d) + (b^2*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (5*b^2*(2*a^2 - b^2)*Cos[c + d*x]*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (b^2*(48*a^4 - 53*a^2*b^2 + 20*b^4)*Cos[c + d*x]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}


{1/(3 + 5*Sec[c + d*x]), x, 2, -(x/12) + (5*ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])])/(6*d)}
{1/(3 + 5*Sec[c + d*x])^2, x, 3, (29*x)/576 + (35*ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])])/(288*d) - (25*Tan[c + d*x])/(48*d*(3 + 5*Sec[c + d*x]))}
{1/(3 + 5*Sec[c + d*x])^3, x, 4, -((1007*x)/55296) + (3055*ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])])/(27648*d) - (25*Tan[c + d*x])/(96*d*(3 + 5*Sec[c + d*x])^2) - (125*Tan[c + d*x])/(4608*d*(3 + 5*Sec[c + d*x]))}
{1/(3 + 5*Sec[c + d*x])^4, x, 5, (21553*x)/2654208 + (11215*ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])])/(1327104*d) - (25*Tan[c + d*x])/(144*d*(3 + 5*Sec[c + d*x])^3) - (25*Tan[c + d*x])/(4608*d*(3 + 5*Sec[c + d*x])^2) - (16925*Tan[c + d*x])/(221184*d*(3 + 5*Sec[c + d*x]))}

{1/(5 + 3*Sec[c + d*x]), x, 2, x/5 - (3*ArcTanh[(1/2)*Tan[(1/2)*(c + d*x)]])/(10*d)}
{1/(5 + 3*Sec[c + d*x])^2, x, 3, x/25 - (123*ArcTanh[(1/2)*Tan[(1/2)*(c + d*x)]])/(800*d) + (9*Tan[c + d*x])/(80*d*(5 + 3*Sec[c + d*x]))}
{1/(5 + 3*Sec[c + d*x])^3, x, 4, x/125 - (8361*ArcTanh[(1/2)*Tan[(1/2)*(c + d*x)]])/(128000*d) + (9*Tan[c + d*x])/(160*d*(5 + 3*Sec[c + d*x])^2) + (963*Tan[c + d*x])/(12800*d*(5 + 3*Sec[c + d*x]))}
{1/(5 + 3*Sec[c + d*x])^4, x, 5, x/625 - (278151*ArcTanh[(1/2)*Tan[(1/2)*(c + d*x)]])/(10240000*d) + (3*Tan[c + d*x])/(80*d*(5 + 3*Sec[c + d*x])^3) + (519*Tan[c + d*x])/(12800*d*(5 + 3*Sec[c + d*x])^2) + (38733*Tan[c + d*x])/(1024000*d*(5 + 3*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (a+b Sec[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^4*Sqrt[a + b*Sec[c + d*x]], x, 8, -((2*a*(a + b)*(8*a^2 + 19*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(8*a^3 + 2*a^2*b + 19*a*b^2 + 25*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(8*a^2 + 19*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*b^3*d) - (2*(4*a^2 - 25*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b^2*d) + (2*a*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*b*d) + (2*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]], x, 7, (2*(a + b)*(2*a^2 - 9*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^2 - 7*a*b - 9*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^2 - 9*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*b^2*d) + (2*a*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*b*d) + (2*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]], x, 6, -((2*a*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b*d) + (2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^1*Sqrt[a + b*Sec[c + d*x]], x, 5, -((2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Sec[c + d*x]^0*Sqrt[a + b*Sec[c + d*x]], x, 4, -((2*(a - b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (4*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^1*Sqrt[a + b*Sec[c + d*x]], x, 7, ((a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]], x, 8, (b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a - b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2 - b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d) + (b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a*d)}


{Sec[c + d*x]^4*(a + b*Sec[c + d*x])^(3/2), x, 9, -((2*(a + b)*(8*a^4 + 33*a^2*b^2 + 147*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(8*a^4 + 2*a^3*b + 33*a^2*b^2 + 186*a*b^3 + 147*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(8*a^4 + 33*a^2*b^2 + 147*b^4)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*b^3*d) - (8*a*(a^2 - 22*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^2*d) + (2*(3*a^2 + 49*b^2)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b*d) + (20*a*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(63*d) + (2*b*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2), x, 8, (4*a*(a + b)*(3*a^2 - 41*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(6*a^3 - 51*a^2*b - 82*a*b^2 - 25*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*a*(3*a^2 - 41*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*b^2*d) + (2*(3*a^2 + 25*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b*d) + (16*a*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*d) + (2*b*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2), x, 7, -((2*(a + b)*(a^2 + 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(a^2 + 4*a*b + 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2 + 3*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(5*b*d) + (2*a*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*d) + (2*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^1*(a + b*Sec[c + d*x])^(3/2), x, 6, -((8*a*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(3*a^2 + 4*a*b + b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (8*a*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d) + (2*b*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^0*(a + b*Sec[c + d*x])^(3/2), x, 7, -((2*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(a^2 - 2*a*b - b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^1*(a + b*Sec[c + d*x])^(3/2), x, 8, (a*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((-2*a^2*b + 2*a*b*(-3*a + 2*b))*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (6*a*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2), x, 8, (5*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a^2 - a*b + 4*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2 + 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d) + (5*b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}


{Sec[c + d*x]^4*(a + b*Sec[c + d*x])^(5/2), x, 10, -((2*a*(a + b)*(8*a^4 + 51*a^2*b^2 + 741*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(693*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(8*a^5 + 2*a^4*b + 51*a^3*b^2 + 663*a^2*b^3 + 741*a*b^4 + 135*b^5)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(693*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(8*a^4 + 51*a^2*b^2 + 741*b^4)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(693*b^3*d) - (2*(4*a^4 - 205*a^2*b^2 - 135*b^4)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(693*b^2*d) + (2*a*(3*a^2 + 229*b^2)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(693*b*d) + (2*(113*a^2 + 81*b^2)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(693*d) + (46*a*b*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(99*d) + (2*b^2*Sec[c + d*x]^4*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(11*d)}
{Sec[c + d*x]^3*(a + b*Sec[c + d*x])^(5/2), x, 9, (2*(a + b)*(10*a^4 - 279*a^2*b^2 - 147*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(10*a^4 - 155*a^3*b - 279*a^2*b^2 - 261*a*b^3 - 147*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(10*a^4 - 279*a^2*b^2 - 147*b^4)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*b^2*d) + (2*a*(5*a^2 + 163*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b*d) + (2*(75*a^2 + 49*b^2)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*d) + (38*a*b*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(63*d) + (2*b^2*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(5/2), x, 8, -((2*a*(a + b)*(3*a^2 + 29*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(21*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(3*a^3 + 27*a^2*b + 29*a*b^2 + 5*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(21*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(3*a^2 + 29*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(21*b*d) + (2*(3*a^2 + 5*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(21*d) + (2*a*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(7*d) + (2*(a + b*Sec[c + d*x])^(5/2)*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^1*(a + b*Sec[c + d*x])^(5/2), x, 7, -((2*(a + b)*(23*a^2 + 9*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(15*a^3 + 23*a^2*b + 17*a*b^2 + 9*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(23*a^2 + 9*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d) + (16*a*b*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*d) + (2*b*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^0*(a + b*Sec[c + d*x])^(5/2), x, 8, -((14*a*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(3*a^3 - 9*a^2*b - 7*a*b^2 - b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^3*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (14*a*b*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d) + (2*b^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^1*(a + b*Sec[c + d*x])^(5/2), x, 8, ((a + b)*(a^2 - 2*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(3*a^2 - 3*a*b - b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (10*a^2*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d + ((a^2 - 2*b^2)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(5/2), x, 8, (9*a*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a^3 - a^2*b + 12*a*b^2 - 4*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*(4*a^2 + 15*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a^2*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d) + (9*a*b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(5/2), x, 9, ((a + b)*(16*a^2 + 33*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (b*(38*a^2 - 13*a*b + 24*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (5*b*(4*a^2 + b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (13*a*b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*d) + (a^2*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d) + ((16*a^2 + 33*b^2)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d)}
{Cos[c + d*x]^4*(a + b*Sec[c + d*x])^(5/2), x, 10, (b*(a + b)*(284*a^2 + 15*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(192*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((72*a^3 - 36*a^2*b + 322*a*b^2 - 59*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(96*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^4 + 120*a^2*b^2 - 5*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(32*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((36*a^2 + 59*b^2)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(96*d) + (17*a*b*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + (a^2*Cos[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (b*(284*a^2 + 15*b^2)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*a*d)}


{(a + b*Sec[c + d*x])^(7/2), x, 9, -((2*b*(a + b)*(58*a^2 + 9*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(15*a^4 - 60*a^3*b - 58*a^2*b^2 - 22*a*b^3 - 9*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(58*a^2 + 9*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d) + (26*a*b^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*d) + (2*b^2*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^5/Sqrt[a + b*Sec[c + d*x]], x, 8, (8*a*(a + b)*(12*a^2 + 11*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(48*a^3 + 12*a^2*b + 44*a*b^2 - 25*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (8*a*(12*a^2 + 11*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*b^4*d) + (2*(24*a^2 + 25*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b^3*d) - (12*a*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*b^2*d) + (2*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(7*b*d)}
{Sec[c + d*x]^4/Sqrt[a + b*Sec[c + d*x]], x, 7, -((2*(a + b)*(8*a^2 + 9*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(8*a^2 + 2*a*b + 9*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(8*a^2 + 9*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*b^3*d) - (8*a*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*b^2*d) + (2*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*b*d)}
{Sec[c + d*x]^3/Sqrt[a + b*Sec[c + d*x]], x, 6, (4*a*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a - b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*a*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^2*d) + (2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b*d)}
{Sec[c + d*x]^2/Sqrt[a + b*Sec[c + d*x]], x, 5, -((2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d)}
{Sec[c + d*x]^1/Sqrt[a + b*Sec[c + d*x]], x, 2, (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^0/Sqrt[a + b*Sec[c + d*x]], x, 4, -((2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^1/Sqrt[a + b*Sec[c + d*x]], x, 5, ((a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d)}
{Cos[c + d*x]^2/Sqrt[a + b*Sec[c + d*x]], x, 8, -((3*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((2*a - b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2 + 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*a*d) - (3*b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a^2*d)}


{Sec[c + d*x]^5/(a + b*Sec[c + d*x])^(3/2), x, 8, -((2*(16*a^4 - 8*a^2*b^2 - 3*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*(a - b)*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(16*a^3 - 12*a^2*b + 4*a*b^2 - 3*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*(a - b)*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(16*a^4 - 8*a^2*b^2 - 3*b^4)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(5*b^4*(a^2 - b^2)*d) - (2*a^2*Sec[c + d*x]^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*a*(8*a^2 - 3*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*b^3*(a^2 - b^2)*d) + (2*(6*a^2 - b^2)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*b^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^4/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*a*(8*a^2 - 5*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(8*a^2 - 6*a*b + b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*a*(8*a^2 - 5*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^3*(a^2 - b^2)*d) - (2*a^2*Sec[c + d*x]*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(4*a^2 - b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^3/(a + b*Sec[c + d*x])^(3/2), x, 6, -((2*(2*a^2 - b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(2*a - b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(2*a^2 - b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b^2*(a^2 - b^2)*d) - (2*a^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^2/(a + b*Sec[c + d*x])^(3/2), x, 5, (2*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*a*Tan[(1/2)*(c + d*x)])/(b*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^1/(a + b*Sec[c + d*x])^(3/2), x, 5, -((2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*Tan[(1/2)*(c + d*x)])/((a + b)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^0/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Tan[(1/2)*(c + d*x)])/(a*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^1/(a + b*Sec[c + d*x])^(3/2), x, 8, ((a^2 - 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (6*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((a^2 - 3*b^2)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^2/(a + b*Sec[c + d*x])^(3/2), x, 9, -((b*(7*a^2 - 15*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^3*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((2*a^2 - 3*a*b + 5*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2 + 15*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Cos[c + d*x]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((a^2 - 5*b^2)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)*d) - (b*(7*a^2 - 15*b^2)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a^3*(a^2 - b^2)*d)}


{Sec[c + d*x]^5/(a + b*Sec[c + d*x])^(5/2), x, 8, (8*a*(4*a^4 - 7*a^2*b^2 + 2*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^4*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(16*a^4 - 12*a^3*b - 16*a^2*b^2 + 9*a*b^3 - b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (8*a*(4*a^4 - 7*a^2*b^2 + 2*b^4)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^4*(a^2 - b^2)^2*d) - (2*a^2*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) - (4*a^2*(3*a^2 - 5*b^2)*Sec[c + d*x]*Tan[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(8*a^4 - 13*a^2*b^2 + b^4)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Sec[c + d*x]^4/(a + b*Sec[c + d*x])^(5/2), x, 7, -((2*(8*a^4 - 15*a^2*b^2 + 3*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(8*a^3 - 6*a^2*b - 9*a*b^2 + 3*b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(8*a^4 - 15*a^2*b^2 + 3*b^4)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^3*(a^2 - b^2)^2*d) - (2*a^2*Sec[c + d*x]*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) - (8*a^2*(a^2 - 2*b^2)*Tan[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^3/(a + b*Sec[c + d*x])^(5/2), x, 6, (4*a*(a^2 - 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^2 - 3*a*b - 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*a*(a^2 - 3*b^2)*Tan[(1/2)*(c + d*x)])/(3*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Sec[c + d*x]^2/(a + b*Sec[c + d*x])^(5/2), x, 6, (2*(a^2 + 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a + 3*b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a^2 + 3*b^2)*Tan[(1/2)*(c + d*x)])/(3*(a - b)*b*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Sec[c + d*x]^1/(a + b*Sec[c + d*x])^(5/2), x, 6, -((8*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(3*a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (8*a*Tan[(1/2)*(c + d*x)])/(3*(a - b)*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Sec[c + d*x]^0/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*b*(7*a^2 - 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a^2 + 3*a*b - 2*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(7*a^2 - 3*b^2)*Tan[(1/2)*(c + d*x)])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Cos[c + d*x]^1/(a + b*Sec[c + d*x])^(5/2), x, 9, ((3*a^4 - 26*a^2*b^2 + 15*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(6*a^2 + 3*a*b - 5*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (10*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*b^2*(9*a^2 - 5*b^2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^4 - 26*a^2*b^2 + 15*b^4)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^2/(a + b*Sec[c + d*x])^(5/2), x, 10, -((b*(33*a^4 - 170*a^2*b^2 + 105*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a^4*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((6*a^4 - 9*a^3*b + 33*a^2*b^2 + 21*a*b^3 - 35*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(6*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2 + 35*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*b^2*(11*a^2 - 7*b^2)*Cos[c + d*x]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^4 - 54*a^2*b^2 + 35*b^4)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^2*d) - (b*(33*a^4 - 170*a^2*b^2 + 105*b^4)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(12*a^4*(a^2 - b^2)^2*d)}


{1/(a + b*Sec[c + d*x])^(7/2), x, 9, (2*b*(58*a^4 - 41*a^2*b^2 + 15*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*a^3*(a - b)^3*(a + b)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(15*a^4 + 30*a^3*b - 17*a^2*b^2 - 6*a*b^3 + 10*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*a^2*(a - b)^3*(a + b)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(58*a^4 - 41*a^2*b^2 + 15*b^4)*Tan[(1/2)*(c + d*x)])/(15*a^3*(a - b)^2*(a + b)^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Tan[c + d*x])/(5*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(5/2)) + (2*b^2*(13*a^2 - 5*b^2)*Tan[c + d*x])/(15*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^(3/2))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (a+b Sec[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2, x, 8, -((12*a*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(7*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (12*a*b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(7*a^2 + 5*b^2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (4*a*b*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d) + (2*b^2*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2, x, 7, -((2*(5*a^2 + 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (4*a*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(5*a^2 + 3*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (4*a*b*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*b^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^2, x, 6, -((4*a*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*(3*a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (4*a*b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d + (2*b^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^2, x, 5, (2*(a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (4*a*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{Sec[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^2, x, 5, (4*a*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(a^2 + 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*a^2*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(a + b*Sec[c + d*x])^2, x, 6, (2*(3*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (4*a*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*a^2*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (4*a*b*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-7/2)*(a + b*Sec[c + d*x])^2, x, 7, (12*a*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(5*a^2 + 7*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*a^2*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (4*a*b*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*(5*a^2 + 7*b^2)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3, x, 8, -((2*a*(5*a^2 + 9*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*b*(21*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*a*(5*a^2 + 9*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*b*(21*a^2 + 5*b^2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (32*a*b^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*b^2*Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^3, x, 7, -((6*b*(5*a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*a*(a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (6*b*(5*a^2 + b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (8*a*b^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(5*d) + (2*b^2*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^3, x, 6, (2*a*(a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*b*(9*a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (16*a*b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*b^2*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^3, x, 6, (2*b*(3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*a*(a^2 + 9*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(a^2 - 3*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(a + b*Sec[c + d*x])^3, x, 6, (6*a*(a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*b*(a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (8*a^2*b*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]]) + (2*a^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{Sec[c + d*x]^(-7/2)*(a + b*Sec[c + d*x])^3, x, 7, (2*b*(9*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*a*(5*a^2 + 21*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (32*a^2*b*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*a*(5*a^2 + 21*b^2)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*a^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{Sec[c + d*x]^(-9/2)*(a + b*Sec[c + d*x])^3, x, 8, (2*a*(7*a^2 + 27*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*b*(15*a^2 + 7*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (40*a^2*b*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*a*(7*a^2 + 27*b^2)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*b*(15*a^2 + 7*b^2)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*a^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^(7/2)/(a + b*Sec[c + d*x]), x, 9, (2*a*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*d) + (2*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b*d) + (2*a^2*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a + b)*d) - (2*a*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b^2*d) + (2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*d)}
{Sec[c + d*x]^(5/2)/(a + b*Sec[c + d*x]), x, 7, -((2*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*d)) - (2*a*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*(a + b)*d) + (2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b*d)}
{Sec[c + d*x]^(3/2)/(a + b*Sec[c + d*x]), x, 3, (2*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a + b)*d)}
{Sec[c + d*x]^(1/2)/(a + b*Sec[c + d*x]), x, 5, (2*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d) - (2*b*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a + b)*d)}
{Sec[c + d*x]^(-1/2)/(a + b*Sec[c + d*x]), x, 7, (2*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d) - (2*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*d) + (2*b^2*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a + b)*d)}
{Sec[c + d*x]^(-3/2)/(a + b*Sec[c + d*x]), x, 8, -((2*b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*d)) + (2*(a^2 + 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^3*d) - (2*b^3*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a + b)*d) + (2*Sin[c + d*x])/(3*a*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(9/2)/(a + b*Sec[c + d*x])^2, x, 10, (a*(5*a^2 - 4*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d) + ((5*a^2 - 2*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^2*(a^2 - b^2)*d) + (a^2*(5*a^2 - 7*b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^3*(a + b)^2*d) - (a*(5*a^2 - 4*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) + ((5*a^2 - 2*b^2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) - (a^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(7/2)/(a + b*Sec[c + d*x])^2, x, 9, -(((3*a^2 - 2*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d)) - (a*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*(a^2 - b^2)*d) - (a*(3*a^2 - 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*(a + b)^2*d) + ((3*a^2 - 2*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b^2*(a^2 - b^2)*d) - (a^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(5/2)/(a + b*Sec[c + d*x])^2, x, 8, (a*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*(a^2 - b^2)*d) + (Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a^2 - b^2)*d) + ((a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b*(a + b)^2*d) - (a^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^2, x, 8, -((Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a^2 - b^2)*d)) - (b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a^2 - b^2)*d) + ((a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a - b)*(a + b)^2*d) + (a*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^2, x, 8, (b*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a^2 - b^2)*d) + ((2*a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d) - (b*(3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*(a + b)^2*d) - (b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^2, x, 8, ((2*a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d) - (b*(4*a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d) + (b^2*(5*a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a - b)*(a + b)^2*d) + (b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^2, x, 9, -((b*(4*a^2 - 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d)) + ((2*a^4 + 16*a^2*b^2 - 15*b^4)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^4*(a^2 - b^2)*d) - (b^3*(7*a^2 - 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^4*(a - b)*(a + b)^2*d) + ((2*a^2 - 5*b^2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]) + (b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^(9/2)/(a + b*Sec[c + d*x])^3, x, 10, -(((15*a^4 - 29*a^2*b^2 + 8*b^4)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d)) - (a*(5*a^2 - 11*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^2*(a^2 - b^2)^2*d) - (a*(15*a^4 - 38*a^2*b^2 + 35*b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^3*(a + b)^3*d) + ((15*a^4 - 29*a^2*b^2 + 8*b^4)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b^3*(a^2 - b^2)^2*d) - (a^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (a^2*(5*a^2 - 11*b^2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(7/2)/(a + b*Sec[c + d*x])^3, x, 9, (3*a*(a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^2*(a^2 - b^2)^2*d) + ((a^2 - 7*b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b*(a^2 - b^2)^2*d) + (3*(a^4 - 2*a^2*b^2 + 5*b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^2*(a + b)^3*d) - (a^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (3*a^2*(a^2 - 3*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(5/2)/(a + b*Sec[c + d*x])^3, x, 9, ((a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b*(a^2 - b^2)^2*d) + (3*(a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*(a^2 - b^2)^2*d) + ((a^4 - 10*a^2*b^2 - 3*b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*(a - b)^2*b*(a + b)^3*d) - (a^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (a*(a^2 - 7*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^3, x, 9, -(((5*a^2 + b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*(a^2 - b^2)^2*d)) - (b*(7*a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a^2 - b^2)^2*d) + ((3*a^4 + 10*a^2*b^2 - b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a - b)^2*(a + b)^3*d) + (a*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (3*(a^2 + b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^3, x, 9, (3*b*(3*a^2 - b^2)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a^2 - b^2)^2*d) + ((8*a^4 - 5*a^2*b^2 + 3*b^4)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d) - (3*b*(5*a^4 - 2*a^2*b^2 + b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a - b)^2*(a + b)^3*d) - (b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (b*(7*a^2 - b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^3, x, 9, ((8*a^4 - 29*a^2*b^2 + 15*b^4)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d) - (3*b*(8*a^4 - 11*a^2*b^2 + 5*b^4)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d) + (b^2*(35*a^4 - 38*a^2*b^2 + 15*b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a - b)^2*(a + b)^3*d) + (b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b^2*(11*a^2 - 5*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^3, x, 10, -((b*(24*a^4 - 65*a^2*b^2 + 35*b^4)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d)) + ((8*a^6 + 128*a^4*b^2 - 223*a^2*b^4 + 105*b^6)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*a^5*(a^2 - b^2)^2*d) - (b^3*(63*a^4 - 86*a^2*b^2 + 35*b^4)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^5*(a - b)^2*(a + b)^3*d) + ((8*a^4 - 61*a^2*b^2 + 35*b^4)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]]) + (b^2*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2) + (b^2*(13*a^2 - 7*b^2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (a+b Sec[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(1/2), x, 10, -(((a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])) + (b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d}
{Sec[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(1/2), x, 6, (2*a*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/(a + b)])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/(a + b)])/(d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^(1/2), x, 3, (2*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^(1/2), x, 7, (2*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(a + b*Sec[c + d*x])^(1/2), x, 8, (2*(a + b)*(9*a^2 - 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Sec[c + d*x]]) - (4*b*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-7/2)*(a + b*Sec[c + d*x])^(1/2), x, 9, (2*b*(a + b)*(19*a^2 + 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4 - 17*a^2*b^2 - 8*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (2*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*a*d*Sec[c + d*x]^(3/2)) + (2*(25*a^2 - 4*b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a^2*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2), x, 11, -((5*a*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]])) + (7*a*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + (5*a*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (b*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(3/2), x, 10, -((b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])) + ((2*a^2 + b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (3*a*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (b*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d}
{Sec[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^(3/2), x, 9, (2*a*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^(3/2), x, 7, (8*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(a + b*Sec[c + d*x])^(3/2), x, 8, (2*(a + b)*(3*a^2 + b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(5*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(5*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d*Sqrt[Sec[c + d*x]]) + (2*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{Sec[c + d*x]^(-7/2)*(a + b*Sec[c + d*x])^(3/2), x, 9, (4*b*(a + b)*(41*a^2 - 3*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4 - 31*a^2*b^2 + 6*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (16*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*(25*a^2 + 3*b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2), x, 12, -(((a + b)*(33*a^2 + 16*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Sec[c + d*x]])) + (b*(59*a^2 + 16*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Sec[c + d*x]]) + (5*a*(a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(8*d*Sqrt[a + b*Sec[c + d*x]]) + ((33*a^2 + 16*b^2)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + (13*a*b*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*d) + (b^2*Sec[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(5/2), x, 11, -((9*a*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]])) + (a*(8*a^2 + 11*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + (b*(15*a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + (9*a*b*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (b^2*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d)}
{Sec[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^(5/2), x, 10, ((a + b)*(2*a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (b*(4*a^2 + b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (5*a*b^2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (b^2*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d}
{Sec[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^(5/2), x, 10, (14*a*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(a^2 + 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^3*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*a^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(a + b)*(9*a^2 + 23*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Sec[c + d*x]]) + (16*b*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (22*a*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-7/2)*(a + b*Sec[c + d*x])^(5/2), x, 9, (2*b*(a + b)*(29*a^2 + 3*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(21*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(5*a^4 - 2*a^2*b^2 - 3*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(21*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (6*a*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d*Sec[c + d*x]^(3/2)) + (2*(5*a^2 + 9*b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-9/2)*(a + b*Sec[c + d*x])^(5/2), x, 10, (2*(a + b)*(147*a^4 + 279*a^2*b^2 - 10*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (4*b*(57*a^4 - 62*a^2*b^2 + 5*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2)) + (38*a*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*(49*a^2 + 75*b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (2*b*(163*a^2 + 5*b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d*Sqrt[Sec[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^(7/2)/(a + b*Sec[c + d*x])^(1/2), x, 11, (3*a*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Sec[c + d*x]]) - (a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Sec[c + d*x]]) - (3*a*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b^2*d) + (Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*b*d)}
{Sec[c + d*x]^(5/2)/(a + b*Sec[c + d*x])^(1/2), x, 10, -(((a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]])) + (Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) - (a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]]) + (Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b*d)}
{Sec[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^(1/2), x, 3, (2*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/(a + b)])/(d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^(1/2), x, 3, (2*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/(a + b)])/(d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^(1/2), x, 6, (2*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^(1/2), x, 7, -((4*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Sec[c + d*x]])) + (2*(a^2 + 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)/(a + b*Sec[c + d*x])^(1/2), x, 8, (2*(a + b)*(9*a^2 + 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^3*d*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(7*a^2 + 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a*d*Sec[c + d*x]^(3/2)) - (8*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^2*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(7/2)/(a + b*Sec[c + d*x])^(3/2), x, 11, -(((3*a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*d*Sqrt[a + b*Sec[c + d*x]])) + (Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]]) - (3*a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^2 - b^2)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^(5/2)/(a + b*Sec[c + d*x])^(3/2), x, 8, (2*a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/((a - b)*b*d*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^(3/2), x, 5, -((2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/((a - b)*d*Sqrt[a + b*Sec[c + d*x]])) + (2*a*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*(a^2 - 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) - (4*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^(3/2), x, 8, -((2*b*(5*a^2 - 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)*d*Sqrt[a + b*Sec[c + d*x]])) + (2*(a^2 + 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2 - 4*b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)/(a + b*Sec[c + d*x])^(3/2), x, 9, (2*(3*a^4 + 8*a^2*b^2 - 16*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(5*a^4*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) - (8*b*(a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(5*a^4*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2 - 6*b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)) - (2*b*(3*a^2 - 8*b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a^3*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(9/2)/(a + b*Sec[c + d*x])^(5/2), x, 12, -(((15*a^4 - 26*a^2*b^2 + 3*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])) + ((5*a^2 - 3*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*b^2*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (5*a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b^3*d*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) - (2*a^2*(5*a^2 - 9*b^2)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((15*a^4 - 26*a^2*b^2 + 3*b^4)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Sec[c + d*x]^(7/2)/(a + b*Sec[c + d*x])^(5/2), x, 11, (2*a*(3*a^2 - 7*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) - (2*a^2*(3*a^2 - 7*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(5/2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (8*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*a*(a^2 - 5*b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^(5/2), x, 8, -((2*(3*a^2 + b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])) - (2*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (4*(a^2 + b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (4*b*(3*a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2 - 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) - (2*b*(5*a^2 - b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(3*a^4 - 15*a^2*b^2 + 8*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(9*a^2 - 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (8*b^2*(2*a^2 - b^2)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^(5/2), x, 9, -((8*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])) + (2*(a^4 + 16*a^2*b^2 - 16*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^4*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) + (4*b^2*(5*a^2 - 3*b^2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4 - 13*a^2*b^2 + 8*b^4)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)/(a + b*Sec[c + d*x])^(5/2), x, 10, (2*(9*a^6 + 55*a^4*b^2 - 212*a^2*b^4 + 128*b^6)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^5*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(17*a^4 + 116*a^2*b^2 - 128*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^5*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)) + (8*b^2*(3*a^2 - 2*b^2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^4 - 71*a^2*b^2 + 48*b^4)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)^2*d*Sec[c + d*x]^(3/2)) - (4*b*(7*a^4 - 49*a^2*b^2 + 32*b^4)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^4*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}


{1/(Sqrt[Sec[c + d*x]]*Sqrt[2 + 3*Sec[c + d*x]]), x, 4, (Sqrt[5]*Sqrt[3 + 2*Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 4/5]*Sqrt[Sec[c + d*x]])/(d*Sqrt[2 + 3*Sec[c + d*x]]) - (3*Sqrt[3 + 2*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 4/5]*Sqrt[Sec[c + d*x]])/(Sqrt[5]*d*Sqrt[2 + 3*Sec[c + d*x]])}
{1/(Sqrt[Sec[c + d*x]]*Sqrt[-2 + 3*Sec[c + d*x]]), x, 4, -((Sqrt[3 - 2*Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), -4]*Sqrt[Sec[c + d*x]])/(d*Sqrt[-2 + 3*Sec[c + d*x]])) + (3*Sqrt[3 - 2*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), -4]*Sqrt[Sec[c + d*x]])/(d*Sqrt[-2 + 3*Sec[c + d*x]])}

{1/(Sqrt[Sec[c + d*x]]*Sqrt[2 - 3*Sec[c + d*x]]), x, 6, -((Sqrt[3 - 2*Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), -4]*Sqrt[Sec[c + d*x]])/(d*Sqrt[2 - 3*Sec[c + d*x]])) + (3*Sqrt[3 - 2*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), -4]*Sqrt[Sec[c + d*x]])/(d*Sqrt[2 - 3*Sec[c + d*x]])}
{1/(Sqrt[Sec[c + d*x]]*Sqrt[-2 - 3*Sec[c + d*x]]), x, 6, (Sqrt[5]*Sqrt[3 + 2*Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 4/5]*Sqrt[Sec[c + d*x]])/(d*Sqrt[-2 - 3*Sec[c + d*x]]) - (3*Sqrt[3 + 2*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 4/5]*Sqrt[Sec[c + d*x]])/(Sqrt[5]*d*Sqrt[-2 - 3*Sec[c + d*x]])}

{1/(Sqrt[Sec[c + d*x]]*Sqrt[3 + 2*Sec[c + d*x]]), x, 4, (2*Sqrt[5]*Sqrt[2 + 3*Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 6/5]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[3 + 2*Sec[c + d*x]]) - (4*Sqrt[2 + 3*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 6/5]*Sqrt[Sec[c + d*x]])/(3*Sqrt[5]*d*Sqrt[3 + 2*Sec[c + d*x]])}
{1/(Sqrt[Sec[c + d*x]]*Sqrt[3 - 2*Sec[c + d*x]]), x, 4, (2*Sqrt[-2 + 3*Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 6]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[3 - 2*Sec[c + d*x]]) + (4*Sqrt[-2 + 3*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 6]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[3 - 2*Sec[c + d*x]])}

{1/(Sqrt[Sec[c + d*x]]*Sqrt[-3 + 2*Sec[c + d*x]]), x, 6, (2*Sqrt[-2 + 3*Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 6]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[-3 + 2*Sec[c + d*x]]) + (4*Sqrt[-2 + 3*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 6]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[-3 + 2*Sec[c + d*x]])}
{1/(Sqrt[Sec[c + d*x]]*Sqrt[-3 - 2*Sec[c + d*x]]), x, 6, (2*Sqrt[5]*Sqrt[2 + 3*Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 6/5]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[-3 - 2*Sec[c + d*x]]) - (4*Sqrt[2 + 3*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 6/5]*Sqrt[Sec[c + d*x]])/(3*Sqrt[5]*d*Sqrt[-3 - 2*Sec[c + d*x]])}


{Sqrt[Sec[c + d*x]]/Sqrt[2 + 3*Sec[c + d*x]], x, 2, (2*Sqrt[3 + 2*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 4/5]*Sqrt[Sec[c + d*x]])/(Sqrt[5]*d*Sqrt[2 + 3*Sec[c + d*x]])}
{Sqrt[Sec[c + d*x]]/Sqrt[-2 + 3*Sec[c + d*x]], x, 2, (2*Sqrt[3 - 2*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), -4]*Sqrt[Sec[c + d*x]])/(d*Sqrt[-2 + 3*Sec[c + d*x]])}

{Sqrt[Sec[c + d*x]]/Sqrt[2 - 3*Sec[c + d*x]], x, 3, (2*Sqrt[3 - 2*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), -4]*Sqrt[Sec[c + d*x]])/(d*Sqrt[2 - 3*Sec[c + d*x]])}
{Sqrt[Sec[c + d*x]]/Sqrt[-2 - 3*Sec[c + d*x]], x, 3, (2*Sqrt[3 + 2*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 4/5]*Sqrt[Sec[c + d*x]])/(Sqrt[5]*d*Sqrt[-2 - 3*Sec[c + d*x]])}

{Sqrt[Sec[c + d*x]]/Sqrt[3 + 2*Sec[c + d*x]], x, 2, (2*Sqrt[2 + 3*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 6/5]*Sqrt[Sec[c + d*x]])/(Sqrt[5]*d*Sqrt[3 + 2*Sec[c + d*x]])}
{Sqrt[Sec[c + d*x]]/Sqrt[3 - 2*Sec[c + d*x]], x, 2, (2*Sqrt[-2 + 3*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 6]*Sqrt[Sec[c + d*x]])/(d*Sqrt[3 - 2*Sec[c + d*x]])}

{Sqrt[Sec[c + d*x]]/Sqrt[-3 + 2*Sec[c + d*x]], x, 3, (2*Sqrt[-2 + 3*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 6]*Sqrt[Sec[c + d*x]])/(d*Sqrt[-3 + 2*Sec[c + d*x]])}
{Sqrt[Sec[c + d*x]]/Sqrt[-3 - 2*Sec[c + d*x]], x, 3, (2*Sqrt[2 + 3*Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 6/5]*Sqrt[Sec[c + d*x]])/(Sqrt[5]*d*Sqrt[-3 - 2*Sec[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (a+b Sec[c+d x])^(n/3)*)


{(a + b*Sec[c + d*x])^(5/3), x, 0, Int[(a + b*Sec[c + d*x])^(5/3), x]}
{(a + b*Sec[c + d*x])^(4/3), x, 0, Int[(a + b*Sec[c + d*x])^(4/3), x]}
{(a + b*Sec[c + d*x])^(2/3), x, 0, Int[(a + b*Sec[c + d*x])^(2/3), x]}
{(a + b*Sec[c + d*x])^(1/3), x, 0, Int[(a + b*Sec[c + d*x])^(1/3), x]}


{1/(a + b*Sec[c + d*x])^(1/3), x, 0, Int[1/(a + b*Sec[c + d*x])^(1/3), x]}
{1/(a + b*Sec[c + d*x])^(2/3), x, 0, Int[1/(a + b*Sec[c + d*x])^(2/3), x]}
{1/(a + b*Sec[c + d*x])^(4/3), x, 1, Int[1/(a + b*Sec[c + d*x])^(4/3), x]}
{1/(a + b*Sec[c + d*x])^(5/3), x, 1, Int[1/(a + b*Sec[c + d*x])^(5/3), x]}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/3) (a+b Sec[c+d x])^n*)
(**)


(* ::Subsubsection:: *)
(*n>0*)


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^(7/3)/(a + b*Sec[c + d*x]), x, 2, Int[Sec[c + d*x]^(7/3)/(a + b*Sec[c + d*x]), x]}
{Sec[c + d*x]^(5/3)/(a + b*Sec[c + d*x]), x, 1, Int[Sec[c + d*x]^(5/3)/(a + b*Sec[c + d*x]), x]}
{Sec[c + d*x]^(4/3)/(a + b*Sec[c + d*x]), x, 1, Int[Sec[c + d*x]^(4/3)/(a + b*Sec[c + d*x]), x]}
{Sec[c + d*x]^(2/3)/(a + b*Sec[c + d*x]), x, 1, Int[Sec[c + d*x]^(2/3)/(a + b*Sec[c + d*x]), x]}
{Sec[c + d*x]^(1/3)/(a + b*Sec[c + d*x]), x, 0, Int[Sec[c + d*x]^(1/3)/(a + b*Sec[c + d*x]), x]}
{Sec[c + d*x]^(-1/3)/(a + b*Sec[c + d*x]), x, 0, Int[1/(Sec[c + d*x]^(1/3)*(a + b*Sec[c + d*x])), x]}
{Sec[c + d*x]^(-2/3)/(a + b*Sec[c + d*x]), x, 0, Int[1/(Sec[c + d*x]^(2/3)*(a + b*Sec[c + d*x])), x]}
{Sec[c + d*x]^(-4/3)/(a + b*Sec[c + d*x]), x, 2, Int[1/(Sec[c + d*x]^(4/3)*(a + b*Sec[c + d*x])), x]}
{Sec[c + d*x]^(-5/3)/(a + b*Sec[c + d*x]), x, 2, Int[1/(Sec[c + d*x]^(5/3)*(a + b*Sec[c + d*x])), x]}
{Sec[c + d*x]^(-7/3)/(a + b*Sec[c + d*x]), x, 3, Int[1/(Sec[c + d*x]^(7/3)*(a + b*Sec[c + d*x])), x]}


{Sec[c + d*x]^(7/3)/Sqrt[a + b*Sec[c + d*x]], x, 1, Int[Sec[c + d*x]^(7/3)/Sqrt[a + b*Sec[c + d*x]], x]}
{Sec[c + d*x]^(5/3)/Sqrt[a + b*Sec[c + d*x]], x, 0, Int[Sec[c + d*x]^(5/3)/Sqrt[a + b*Sec[c + d*x]], x]}
{Sec[c + d*x]^(4/3)/Sqrt[a + b*Sec[c + d*x]], x, 0, Int[Sec[c + d*x]^(4/3)/Sqrt[a + b*Sec[c + d*x]], x]}
{Sec[c + d*x]^(2/3)/Sqrt[a + b*Sec[c + d*x]], x, 0, Int[Sec[c + d*x]^(2/3)/Sqrt[a + b*Sec[c + d*x]], x]}
{Sec[c + d*x]^(1/3)/Sqrt[a + b*Sec[c + d*x]], x, 0, Int[Sec[c + d*x]^(1/3)/Sqrt[a + b*Sec[c + d*x]], x]}
{Sec[c + d*x]^(-1/3)/Sqrt[a + b*Sec[c + d*x]], x, 0, Int[1/(Sec[c + d*x]^(1/3)*Sqrt[a + b*Sec[c + d*x]]), x]}
{Sec[c + d*x]^(-2/3)/Sqrt[a + b*Sec[c + d*x]], x, 0, Int[1/(Sec[c + d*x]^(2/3)*Sqrt[a + b*Sec[c + d*x]]), x]}
{Sec[c + d*x]^(-4/3)/Sqrt[a + b*Sec[c + d*x]], x, 1, Int[1/(Sec[c + d*x]^(4/3)*Sqrt[a + b*Sec[c + d*x]]), x]}
{Sec[c + d*x]^(-5/3)/Sqrt[a + b*Sec[c + d*x]], x, 1, Int[1/(Sec[c + d*x]^(5/3)*Sqrt[a + b*Sec[c + d*x]]), x]}
{Sec[c + d*x]^(-7/3)/Sqrt[a + b*Sec[c + d*x]], x, 2, Int[1/(Sec[c + d*x]^(7/3)*Sqrt[a + b*Sec[c + d*x]]), x]}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (a+b Sec[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^2, x, 7, (2*(7*a^2 + 9*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (20*a*b*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (20*a*b*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(7*a^2 + 9*b^2)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (4*a*b*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*d) + (2*a^2*Cos[c + d*x]^(7/2)*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2, x, 6, (12*a*b*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(5*a^2 + 7*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(5*a^2 + 7*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (4*a*b*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d) + (2*a^2*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2, x, 5, (2*(3*a^2 + 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (4*a*b*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (4*a*b*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a^2*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2, x, 4, (4*a*b*EllipticE[(1/2)*(c + d*x), 2])/d + (2*(a^2 + 3*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*a^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^2, x, 4, (2*(a^2 - b^2)*EllipticE[(1/2)*(c + d*x), 2])/d + (4*a*b*EllipticF[(1/2)*(c + d*x), 2])/d + (2*b^2*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^2, x, 5, -((4*a*b*EllipticE[(1/2)*(c + d*x), 2])/d) + (2*(3*a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*b^2*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (4*a*b*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^2, x, 6, -((2*(5*a^2 + 3*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (4*a*b*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*b^2*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (4*a*b*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(5*a^2 + 3*b^2)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-5/2)*(a + b*Sec[c + d*x])^2, x, 7, -((12*a*b*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(7*a^2 + 5*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*b^2*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (4*a*b*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(7*a^2 + 5*b^2)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (12*a*b*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^3, x, 7, (2*a*(7*a^2 + 27*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*b*(15*a^2 + 7*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*b*(15*a^2 + 7*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*a*(7*a^2 + 27*b^2)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (40*a^2*b*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(63*d) + (2*a^2*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^3, x, 6, (2*b*(9*a^2 + 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*a*(5*a^2 + 21*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*a*(5*a^2 + 21*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (32*a^2*b*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(35*d) + (2*a^2*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^3, x, 5, (6*a*(a^2 + 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*b*(a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/d + (8*a^2*b*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(5*d) + (2*a^2*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3, x, 5, (2*b*(3*a^2 - b^2)*EllipticE[(1/2)*(c + d*x), 2])/d + (2*a*(a^2 + 9*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(a^2 - 3*b^2)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*a^2*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^3, x, 5, (2*a*(a^2 - 3*b^2)*EllipticE[(1/2)*(c + d*x), 2])/d + (2*b*(9*a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (16*a*b^2*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*b^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^3, x, 6, -((6*b*(5*a^2 + b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*a*(a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/d + (8*a*b^2*Sin[c + d*x])/(5*d*Cos[c + d*x]^(3/2)) + (6*b*(5*a^2 + b^2)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*b^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d*Cos[c + d*x]^(3/2))}
{Cos[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^3, x, 7, -((2*a*(5*a^2 + 9*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*b*(21*a^2 + 5*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (32*a*b^2*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*b*(21*a^2 + 5*b^2)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*a*(5*a^2 + 9*b^2)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*b^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d*Cos[c + d*x]^(5/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(5/2)/(a + b*Sec[c + d*x]), x, 8, (2*(3*a^2 + 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(5*a^3*d) - (2*b*(a^2 + 3*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^4*d) + (2*b^4*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^4*(a + b)*d) - (2*b*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*d) + (2*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*a*d)}
{Cos[c + d*x]^(3/2)/(a + b*Sec[c + d*x]), x, 7, -((2*b*EllipticE[(1/2)*(c + d*x), 2])/(a^2*d)) + (2*(a^2 + 3*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^3*d) - (2*b^3*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^3*(a + b)*d) + (2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*d)}
{Cos[c + d*x]^(1/2)/(a + b*Sec[c + d*x]), x, 6, (2*EllipticE[(1/2)*(c + d*x), 2])/(a*d) - (2*b*EllipticF[(1/2)*(c + d*x), 2])/(a^2*d) + (2*b^2*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a + b)*d)}
{Cos[c + d*x]^(-1/2)/(a + b*Sec[c + d*x]), x, 4, (2*EllipticF[(1/2)*(c + d*x), 2])/(a*d) - (2*b*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a*(a + b)*d)}
{Cos[c + d*x]^(-3/2)/(a + b*Sec[c + d*x]), x, 2, (2*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/((a + b)*d)}
{Cos[c + d*x]^(-5/2)/(a + b*Sec[c + d*x]), x, 6, -((2*EllipticE[(1/2)*(c + d*x), 2])/(b*d)) - (2*a*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(b*(a + b)*d) + (2*Sin[c + d*x])/(b*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)/(a + b*Sec[c + d*x]), x, 8, (2*a*EllipticE[(1/2)*(c + d*x), 2])/(b^2*d) + (2*EllipticF[(1/2)*(c + d*x), 2])/(3*b*d) + (2*a^2*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(b^2*(a + b)*d) + (2*Sin[c + d*x])/(3*b*d*Cos[c + d*x]^(3/2)) - (2*a*Sin[c + d*x])/(b^2*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^2, x, 8, -((b*(4*a^2 - 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(a^3*(a^2 - b^2)*d)) + ((2*a^4 + 16*a^2*b^2 - 15*b^4)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^4*(a^2 - b^2)*d) - (b^3*(7*a^2 - 5*b^2)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^4*(a - b)*(a + b)^2*d) + ((2*a^2 - 5*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + (b^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^2, x, 7, ((2*a^2 - 3*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(a^2*(a^2 - b^2)*d) - (b*(4*a^2 - 3*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(a^3*(a^2 - b^2)*d) + (b^2*(5*a^2 - 3*b^2)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^3*(a - b)*(a + b)^2*d) + (b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^2, x, 7, (b*EllipticE[(1/2)*(c + d*x), 2])/(a*(a^2 - b^2)*d) + ((2*a^2 - b^2)*EllipticF[(1/2)*(c + d*x), 2])/(a^2*(a^2 - b^2)*d) - (b*(3*a^2 - b^2)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a - b)*(a + b)^2*d) - (b*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^2, x, 7, -(EllipticE[(1/2)*(c + d*x), 2]/((a^2 - b^2)*d)) - (b*EllipticF[(1/2)*(c + d*x), 2])/(a*(a^2 - b^2)*d) + ((a^2 + b^2)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a*(a - b)*(a + b)^2*d) + (a*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(-5/2)/(a + b*Sec[c + d*x])^2, x, 7, (a*EllipticE[(1/2)*(c + d*x), 2])/(b*(a^2 - b^2)*d) + EllipticF[(1/2)*(c + d*x), 2]/((a^2 - b^2)*d) + ((a^2 - 3*b^2)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b*(a + b)^2*d) - (a^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(-7/2)/(a + b*Sec[c + d*x])^2, x, 8, -(((3*a^2 - 2*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(b^2*(a^2 - b^2)*d)) - (a*EllipticF[(1/2)*(c + d*x), 2])/(b*(a^2 - b^2)*d) - (a*(3*a^2 - 5*b^2)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^2*(a + b)^2*d) + ((3*a^2 - 2*b^2)*Sin[c + d*x])/(b^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) - (a^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x]))}


{Cos[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^3, x, 9, -((b*(24*a^4 - 65*a^2*b^2 + 35*b^4)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^4*(a^2 - b^2)^2*d)) + ((8*a^6 + 128*a^4*b^2 - 223*a^2*b^4 + 105*b^6)*EllipticF[(1/2)*(c + d*x), 2])/(12*a^5*(a^2 - b^2)^2*d) - (b^3*(63*a^4 - 86*a^2*b^2 + 35*b^4)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a^5*(a - b)^2*(a + b)^3*d) + ((8*a^4 - 61*a^2*b^2 + 35*b^4)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d) + (b^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b^2*(13*a^2 - 7*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^3, x, 8, ((8*a^4 - 29*a^2*b^2 + 15*b^4)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^3*(a^2 - b^2)^2*d) - (3*b*(8*a^4 - 11*a^2*b^2 + 5*b^4)*EllipticF[(1/2)*(c + d*x), 2])/(4*a^4*(a^2 - b^2)^2*d) + (b^2*(35*a^4 - 38*a^2*b^2 + 15*b^4)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a^4*(a - b)^2*(a + b)^3*d) + (b^2*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2) + (b^2*(11*a^2 - 5*b^2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^3, x, 8, (3*b*(3*a^2 - b^2)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^2*(a^2 - b^2)^2*d) + ((8*a^4 - 5*a^2*b^2 + 3*b^4)*EllipticF[(1/2)*(c + d*x), 2])/(4*a^3*(a^2 - b^2)^2*d) - (3*b*(5*a^4 - 2*a^2*b^2 + b^4)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a^3*(a - b)^2*(a + b)^3*d) - (b*Sin[c + d*x])/(2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2) - (b*(7*a^2 - b^2)*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^3, x, 8, -(((5*a^2 + b^2)*EllipticE[(1/2)*(c + d*x), 2])/(4*a*(a^2 - b^2)^2*d)) - (b*(7*a^2 - b^2)*EllipticF[(1/2)*(c + d*x), 2])/(4*a^2*(a^2 - b^2)^2*d) + ((3*a^4 + 10*a^2*b^2 - b^4)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a^2*(a - b)^2*(a + b)^3*d) + (a*Sin[c + d*x])/(2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2) + (3*(a^2 + b^2)*Sin[c + d*x])/(4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(-5/2)/(a + b*Sec[c + d*x])^3, x, 8, ((a^2 + 5*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(4*b*(a^2 - b^2)^2*d) + (3*(a^2 + b^2)*EllipticF[(1/2)*(c + d*x), 2])/(4*a*(a^2 - b^2)^2*d) + ((a^4 - 10*a^2*b^2 - 3*b^4)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a*(a - b)^2*b*(a + b)^3*d) - (a^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2) + (a*(a^2 - 7*b^2)*Sin[c + d*x])/(4*b*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(-7/2)/(a + b*Sec[c + d*x])^3, x, 8, (3*a*(a^2 - 3*b^2)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^2*(a^2 - b^2)^2*d) + ((a^2 - 7*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(4*b*(a^2 - b^2)^2*d) + (3*(a^4 - 2*a^2*b^2 + 5*b^4)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^2*(a + b)^3*d) - (a^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2) - (3*a^2*(a^2 - 3*b^2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^(-9/2)/(a + b*Sec[c + d*x])^3, x, 9, -(((15*a^4 - 29*a^2*b^2 + 8*b^4)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^3*(a^2 - b^2)^2*d)) - (a*(5*a^2 - 11*b^2)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^2*(a^2 - b^2)^2*d) - (a*(15*a^4 - 38*a^2*b^2 + 35*b^4)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^3*(a + b)^3*d) + ((15*a^4 - 29*a^2*b^2 + 8*b^4)*Sin[c + d*x])/(4*b^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) - (a^2*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2) - (a^2*(5*a^2 - 11*b^2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (a+b Sec[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(1/2), x, 8, (2*(a + b)*(9*a^2 - 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*b*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a*d) + (2*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(1/2), x, 7, (2*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(1/2), x, 3, (2*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^(1/2), x, 6, (2*a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^(1/2), x, 10, -(((a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(3/2), x, 9, (4*b*(a + b)*(41*a^2 - 3*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4 - 31*a^2*b^2 + 6*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^2 + 3*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a*d) + (16*b*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*d) + (2*a*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2), x, 8, (2*(a + b)*(3*a^2 + b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(5*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(5*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2), x, 7, (8*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(3/2), x, 9, (2*a*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^(3/2), x, 10, -((b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + ((2*a^2 + b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (3*a*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^(3/2), x, 11, -((5*a*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (7*a*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d*Cos[c + d*x]^(3/2)) + (5*a*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^(5/2), x, 10, (2*(a + b)*(147*a^4 + 279*a^2*b^2 - 10*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*b*(57*a^4 - 62*a^2*b^2 + 5*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(163*a^2 + 5*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d) + (2*(49*a^2 + 75*b^2)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*d) + (38*a*b*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(63*d) + (2*a^2*Cos[c + d*x]^(7/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(5/2), x, 9, (2*b*(a + b)*(29*a^2 + 3*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(21*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(5*a^4 - 2*a^2*b^2 - 3*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(21*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(5*a^2 + 9*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(21*d) + (6*a*b*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d) + (2*a^2*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(a + b)*(9*a^2 + 23*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (16*b*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (22*a*b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*a^2*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2), x, 10, (14*a*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(a^2 + 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^3*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a^2*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(5/2), x, 10, ((a + b)*(2*a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(4*a^2 + b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (5*a*b^2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-1/2)*(a + b*Sec[c + d*x])^(5/2), x, 11, -((9*a*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (a*(8*a^2 + 11*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(15*a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d*Cos[c + d*x]^(3/2)) + (9*a*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-3/2)*(a + b*Sec[c + d*x])^(5/2), x, 12, -(((a + b)*(33*a^2 + 16*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (b*(59*a^2 + 16*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (5*a*(a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(8*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(5/2)) + (13*a*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*d*Cos[c + d*x]^(3/2)) + ((33*a^2 + 16*b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d*Sqrt[Cos[c + d*x]])}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Cos[c + d*x]^(5/2)/(a + b*Sec[c + d*x])^(1/2), x, 8, (2*(a + b)*(9*a^2 + 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(7*a^2 + 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (8*b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^2*d) + (2*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a*d)}
{Cos[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^(1/2), x, 7, -((4*b*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(a^2 + 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a*d)}
{Cos[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^(1/2), x, 6, (2*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^(1/2), x, 3, (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^(1/2), x, 3, (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-5/2)/(a + b*Sec[c + d*x])^(1/2), x, 10, -(((a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b*d*Sqrt[Cos[c + d*x]])}
{Cos[c + d*x]^(-7/2)/(a + b*Sec[c + d*x])^(1/2), x, 11, (3*a*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(4*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(4*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(4*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*b*d*Cos[c + d*x]^(3/2)) - (3*a*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b^2*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(5/2)/(a + b*Sec[c + d*x])^(3/2), x, 9, (2*(3*a^4 + 8*a^2*b^2 - 16*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(5*a^4*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (8*b*(a^2 + 4*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(5*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(3*a^2 - 8*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a^3*(a^2 - b^2)*d) + (2*(a^2 - 6*b^2)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^(3/2), x, 8, -((2*b*(5*a^2 - 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^3*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(a^2 + 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2 - 4*b^2)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*(a^2 - 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(a*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^(3/2), x, 5, -((2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*a*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-5/2)/(a + b*Sec[c + d*x])^(3/2), x, 8, (2*a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/((a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-7/2)/(a + b*Sec[c + d*x])^(3/2), x, 11, -(((3*a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/((a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (3*a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Sin[c + d*x])/(b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^2 - b^2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(3/2)/(a + b*Sec[c + d*x])^(5/2), x, 9, -((8*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(a^4 + 16*a^2*b^2 - 16*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^4*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (4*b^2*(5*a^2 - 3*b^2)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4 - 13*a^2*b^2 + 8*b^4)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^(1/2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(3*a^4 - 15*a^2*b^2 + 8*b^4)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(9*a^2 - 8*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) + (8*b^2*(2*a^2 - b^2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-1/2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (4*b*(3*a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2 - 2*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Sin[c + d*x])/(3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) - (2*b*(5*a^2 - b^2)*Sin[c + d*x])/(3*a*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-3/2)/(a + b*Sec[c + d*x])^(5/2), x, 8, -((2*(3*a^2 + b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*Sin[c + d*x])/(3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) + (4*(a^2 + b^2)*Sin[c + d*x])/(3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-5/2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (8*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) + (2*a*(a^2 - 5*b^2)*Sin[c + d*x])/(3*b*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^(-7/2)/(a + b*Sec[c + d*x])^(5/2), x, 11, (2*a*(3*a^2 - 7*b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*a*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*a^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)) - (2*a^2*(3*a^2 - 7*b^2)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}


(* ::Section:: *)
(*Sec[c+d x]^m (A+B Sec[c+d x]) (a+b Sec[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (A+B Sec[c+d x]) (a+b Sec[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^3*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 5, ((4*a*A + 3*b*B)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*(A*b + a*B)*Tan[c + d*x])/(3*d) + ((4*a*A + 3*b*B)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((A*b + a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d) + (b*B*Sec[c + d*x]^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 4, ((A*b + a*B)*ArcTanh[Sin[c + d*x]])/(2*d) + ((3*a*A + 2*b*B)*Tan[c + d*x])/(3*d) + ((A*b + a*B)*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (b*B*Sec[c + d*x]^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 3, ((2*a*A + b*B)*ArcTanh[Sin[c + d*x]])/(2*d) + ((A*b + a*B)*Tan[c + d*x])/d + (b*B*Sec[c + d*x]*Tan[c + d*x])/(2*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 2, a*A*x + ((A*b + a*B)*ArcTanh[Sin[c + d*x]])/d + (b*B*Tan[c + d*x])/d}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 3, (A*b + a*B)*x + (b*B*ArcTanh[Sin[c + d*x]])/d + (a*A*Sin[c + d*x])/d}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 3, (1/2)*(a*A + 2*b*B)*x + ((A*b + a*B)*Sin[c + d*x])/d + (a*A*Cos[c + d*x]*Sin[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 4, (1/2)*(A*b + a*B)*x + ((2*a*A + 3*b*B)*Sin[c + d*x])/(3*d) + ((A*b + a*B)*Cos[c + d*x]*Sin[c + d*x])/(2*d) + (a*A*Cos[c + d*x]^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 5, (1/8)*(3*a*A + 4*b*B)*x + (2*(A*b + a*B)*Sin[c + d*x])/(3*d) + ((3*a*A + 4*b*B)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((A*b + a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(3*d) + (a*A*Cos[c + d*x]^3*Sin[c + d*x])/(4*d)}


{Sec[c + d*x]^3*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 6, ((4*a^2*A + 3*A*b^2 + 6*a*b*B)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*(10*a*A*b + 5*a^2*B + 4*b^2*B)*Tan[c + d*x])/(15*d) + ((4*a^2*A + 3*A*b^2 + 6*a*b*B)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((10*a*A*b + 5*a^2*B + 4*b^2*B)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (b*(5*A*b + 6*a*B)*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (b*B*Sec[c + d*x]^3*(a + b*Sec[c + d*x])*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 5, ((8*a*A*b + 4*a^2*B + 3*b^2*B)*ArcTanh[Sin[c + d*x]])/(8*d) + ((3*a^2*A + 2*A*b^2 + 4*a*b*B)*Tan[c + d*x])/(3*d) + ((8*a*A*b + 4*a^2*B + 3*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (b*(4*A*b + 5*a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(12*d) + (b*B*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 4, ((2*a^2*A + A*b^2 + 2*a*b*B)*ArcTanh[Sin[c + d*x]])/(2*d) + (2*(3*a*A*b + a^2*B + b^2*B)*Tan[c + d*x])/(3*d) + (b*(3*A*b + 2*a*B)*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (B*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 4, a^2*A*x + ((4*a*A*b + 2*a^2*B + b^2*B)*ArcTanh[Sin[c + d*x]])/(2*d) + (b*(2*A*b + 3*a*B)*Tan[c + d*x])/(2*d) + (b*B*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 4, a*(2*A*b + a*B)*x + (b*(A*b + 2*a*B)*ArcTanh[Sin[c + d*x]])/d + (a*(a*A - b*B)*Sin[c + d*x])/d + (b*B*(a + b*Sec[c + d*x])*Sin[c + d*x])/d}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 4, (1/2)*(a^2*A + 2*A*b^2 + 4*a*b*B)*x + (b^2*B*ArcTanh[Sin[c + d*x]])/d + (a*(3*A*b + 2*a*B)*Sin[c + d*x])/(2*d) + (a*A*(b + a*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 4, (1/2)*(2*a*A*b + a^2*B + 2*b^2*B)*x + ((2*a^2*A + 3*A*b^2 + 6*a*b*B)*Sin[c + d*x])/(3*d) + (a*(4*A*b + 3*a*B)*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (a*A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 5, (1/8)*(3*a^2*A + 4*A*b^2 + 8*a*b*B)*x + ((4*a*A*b + 2*a^2*B + 3*b^2*B)*Sin[c + d*x])/(3*d) + ((3*a^2*A + 4*A*b^2 + 8*a*b*B)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*(5*A*b + 4*a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(12*d) + (a*A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 6, (1/8)*(6*a*A*b + 3*a^2*B + 4*b^2*B)*x + (2*(4*a^2*A + 5*A*b^2 + 10*a*b*B)*Sin[c + d*x])/(15*d) + ((6*a*A*b + 3*a^2*B + 4*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((4*a^2*A + 5*A*b^2 + 10*a*b*B)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (a*(6*A*b + 5*a*B)*Cos[c + d*x]^3*Sin[c + d*x])/(20*d) + (a*A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}


{Sec[c + d*x]^2*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 6, ((12*a^2*A*b + 3*A*b^3 + 4*a^3*B + 9*a*b^2*B)*ArcTanh[Sin[c + d*x]])/(8*d) + ((15*a^3*A + 30*a*A*b^2 + 30*a^2*b*B + 8*b^3*B)*Tan[c + d*x])/(15*d) + ((12*a^2*A*b + 3*A*b^3 + 4*a^3*B + 9*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (b*(45*a*A*b + 27*a^2*B + 16*b^2*B)*Sec[c + d*x]^2*Tan[c + d*x])/(60*d) + (b*(5*A*b + 7*a*B)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(20*d) + (b*B*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 5, ((8*a^3*A + 12*a*A*b^2 + 12*a^2*b*B + 3*b^3*B)*ArcTanh[Sin[c + d*x]])/(8*d) + ((16*a^2*A*b + 4*A*b^3 + 3*a^3*B + 12*a*b^2*B)*Tan[c + d*x])/(6*d) + (b*(20*a*A*b + 6*a^2*B + 9*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + ((4*A*b + 3*a*B)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (B*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 5, a^3*A*x + ((6*a^2*A*b + A*b^3 + 2*a^3*B + 3*a*b^2*B)*ArcTanh[Sin[c + d*x]])/(2*d) + (b*(15*a*A*b + 11*a^2*B + 4*b^2*B)*Tan[c + d*x])/(6*d) + (b*(3*A*b + 5*a*B)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (b*B*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 5, (3*a^2*A*b + a^3*B)*x + (b*(6*a*A*b + 6*a^2*B + b^2*B)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(2*a*A - b*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(2*d) + (b*B*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) - (b*(2*a^2*A - 2*A*b^2 - 5*a*b*B)*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 5, (1/2)*a^3*A*x + 3*a*A*b^2*x + 3*a^2*b*B*x + (b^2*(A*b + 3*a*B)*ArcTanh[Sin[c + d*x]])/d + (a*(2*A*b + a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/d + (a*A*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) - (b*(5*a*A*b + 2*a^2*B - 2*b^2*B)*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 5, (1/2)*(3*a^2*A*b + 2*A*b^3 + a^3*B + 6*a*b^2*B)*x + (b^3*B*ArcTanh[Sin[c + d*x]])/d + (a*(4*a^2*A + 11*A*b^2 + 15*a*b*B)*Sin[c + d*x])/(6*d) + (a*(5*A*b + 3*a*B)*(b + a*Cos[c + d*x])*Sin[c + d*x])/(6*d) + (a*A*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 5, (1/8)*(3*a^3*A + 12*a*A*b^2 + 12*a^2*b*B + 8*b^3*B)*x + ((6*a^2*A*b + 3*A*b^3 + 2*a^3*B + 9*a*b^2*B)*Sin[c + d*x])/(3*d) + (a*(9*a^2*A + 18*A*b^2 + 28*a*b*B)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + (a*(3*A*b + 2*a*B)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(6*d) + (a*A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 6, (1/8)*(9*a^2*A*b + 4*A*b^3 + 3*a^3*B + 12*a*b^2*B)*x + ((8*a^3*A + 30*a*A*b^2 + 30*a^2*b*B + 15*b^3*B)*Sin[c + d*x])/(15*d) + ((9*a^2*A*b + 4*A*b^3 + 3*a^3*B + 12*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*(16*a^2*A + 27*A*b^2 + 45*a*b*B)*Cos[c + d*x]^2*Sin[c + d*x])/(60*d) + (a*(7*A*b + 5*a*B)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(20*d) + (a*A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d)}


{Sec[c + d*x]^2*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^4, x, 7, ((32*a^3*A*b + 24*a*A*b^3 + 8*a^4*B + 36*a^2*b^2*B + 5*b^4*B)*ArcTanh[Sin[c + d*x]])/(16*d) + ((15*a^4*A + 60*a^2*A*b^2 + 8*A*b^4 + 40*a^3*b*B + 32*a*b^3*B)*Tan[c + d*x])/(15*d) + ((32*a^3*A*b + 24*a*A*b^3 + 8*a^4*B + 36*a^2*b^2*B + 5*b^4*B)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + (b*(144*a^2*A*b + 32*A*b^3 + 56*a^3*B + 103*a*b^2*B)*Sec[c + d*x]^2*Tan[c + d*x])/(120*d) + (b*(72*a*A*b + 48*a^2*B + 25*b^2*B)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(120*d) + (b*(2*A*b + 3*a*B)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(10*d) + (b*B*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(6*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^4, x, 6, ((8*a^4*A + 24*a^2*A*b^2 + 3*A*b^4 + 16*a^3*b*B + 12*a*b^3*B)*ArcTanh[Sin[c + d*x]])/(8*d) + ((95*a^3*A*b + 80*a*A*b^3 + 12*a^4*B + 112*a^2*b^2*B + 16*b^4*B)*Tan[c + d*x])/(30*d) + (b*(130*a^2*A*b + 45*A*b^3 + 24*a^3*B + 116*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(120*d) + ((35*a*A*b + 12*a^2*B + 16*b^2*B)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(60*d) + ((5*A*b + 4*a*B)*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(20*d) + (B*(a + b*Sec[c + d*x])^4*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^4, x, 6, a^4*A*x + ((32*a^3*A*b + 16*a*A*b^3 + 8*a^4*B + 24*a^2*b^2*B + 3*b^4*B)*ArcTanh[Sin[c + d*x]])/(8*d) + (b*(104*a^2*A*b + 16*A*b^3 + 50*a^3*B + 55*a*b^2*B)*Tan[c + d*x])/(24*d) + (b*(32*a*A*b + 26*a^2*B + 9*b^2*B)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(24*d) + (b*(4*A*b + 7*a*B)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (b*B*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^4, x, 6, a^3*(4*A*b + a*B)*x + (b*(12*a^2*A*b + A*b^3 + 8*a^3*B + 4*a*b^2*B)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(3*a*A - b*B)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(3*d) + (b*B*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d) - (b*(6*a^3*A - 21*a*A*b^2 - 26*a^2*b*B - 4*b^3*B)*Tan[c + d*x])/(6*d) - (b*(6*a^2*A - 3*A*b^2 - 8*a*b*B)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^4, x, 6, (1/2)*a^2*(a^2*A + 12*A*b^2 + 8*a*b*B)*x + (b^2*(8*a*A*b + 12*a^2*B + b^2*B)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*(5*A*b + 2*a*B)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (a*A*Cos[c + d*x]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(2*d) - (b*(7*a^2*A*b - 2*A*b^3 + 2*a^3*B - 7*a*b^2*B)*Tan[c + d*x])/(2*d) - (b*(6*a*A*b + 2*a^2*B - b^2*B)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^4, x, 6, (1/2)*a*(4*a^2*A*b + 8*A*b^3 + a^3*B + 12*a*b^2*B)*x + (b^3*(A*b + 4*a*B)*ArcTanh[Sin[c + d*x]])/d + (a*(2*a^2*A + 9*A*b^2 + 9*a*b*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d) + (a*(2*A*b + a*B)*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (a*A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d) - (b*(4*a^3*A + 26*a*A*b^2 + 21*a^2*b*B - 6*b^3*B)*Tan[c + d*x])/(6*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^4, x, 6, (1/8)*(3*a^4*A + 24*a^2*A*b^2 + 8*A*b^4 + 16*a^3*b*B + 32*a*b^3*B)*x + (b^4*B*ArcTanh[Sin[c + d*x]])/d + (a*(55*a^2*A*b + 50*A*b^3 + 16*a^3*B + 104*a*b^2*B)*Sin[c + d*x])/(24*d) + (a*(9*a^2*A + 26*A*b^2 + 32*a*b*B)*(b + a*Cos[c + d*x])*Sin[c + d*x])/(24*d) + (a*(7*A*b + 4*a*B)*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) + (a*A*(b + a*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^4, x, 6, (1/8)*(12*a^3*A*b + 16*a*A*b^3 + 3*a^4*B + 24*a^2*b^2*B + 8*b^4*B)*x + ((8*a^4*A + 60*a^2*A*b^2 + 15*A*b^4 + 40*a^3*b*B + 60*a*b^3*B)*Sin[c + d*x])/(15*d) + (a*(148*a^2*A*b + 96*A*b^3 + 45*a^3*B + 230*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + (a*(8*a^2*A + 18*A*b^2 + 25*a*b*B)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(30*d) + (a*(8*A*b + 5*a*B)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(20*d) + (a*A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^6*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^4, x, 7, (1/16)*(5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B)*x + ((32*a^3*A*b + 40*a*A*b^3 + 8*a^4*B + 60*a^2*b^2*B + 15*b^4*B)*Sin[c + d*x])/(15*d) + ((5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + (a*(103*a^2*A*b + 56*A*b^3 + 32*a^3*B + 144*a*b^2*B)*Cos[c + d*x]^2*Sin[c + d*x])/(120*d) + (a*(25*a^2*A + 48*A*b^2 + 72*a*b*B)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(120*d) + (a*(3*A*b + 2*a*B)*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(10*d) + (a*A*Cos[c + d*x]^5*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(6*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^4*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 7, ((2*a^2*A*b + A*b^3 - 2*a^3*B - a*b^2*B)*ArcTanh[Sin[c + d*x]])/(2*b^4*d) + (2*a^3*(A*b - a*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) - ((3*a*A*b - 3*a^2*B - 2*b^2*B)*Tan[c + d*x])/(3*b^3*d) + ((A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*d) + (B*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*d)}
{Sec[c + d*x]^3*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 6, -(((2*a*A*b - 2*a^2*B - b^2*B)*ArcTanh[Sin[c + d*x]])/(2*b^3*d)) - (2*a^2*(A*b - a*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) + ((A*b - a*B)*Tan[c + d*x])/(b^2*d) + (B*Sec[c + d*x]*Tan[c + d*x])/(2*b*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 6, ((A*b - a*B)*ArcTanh[Sin[c + d*x]])/(b^2*d) + (2*a*(A*b - a*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + (B*Tan[c + d*x])/(b*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 4, (B*ArcTanh[Sin[c + d*x]])/(b*d) - (2*(A*b - a*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b*Sqrt[a^2 - b^2]*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 2, (A*x)/a + (2*(A*b - a*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2]*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 4, -(((A*b - a*B)*x)/a^2) - (2*b*(A*b - a*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) + (A*Sin[c + d*x])/(a*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 5, ((a^2*A + 2*A*b^2 - 2*a*b*B)*x)/(2*a^3) + (2*b^2*(A*b - a*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d) - ((A*b - a*B)*Sin[c + d*x])/(a^2*d) + (A*Cos[c + d*x]*Sin[c + d*x])/(2*a*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 6, -(((a^2*A*b + 2*A*b^3 - a^3*B - 2*a*b^2*B)*x)/(2*a^4)) - (2*b^3*(A*b - a*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*Sqrt[a^2 - b^2]*d) + ((2*a^2*A + 3*A*b^2 - 3*a*b*B)*Sin[c + d*x])/(3*a^3*d) - ((A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*d) + (A*Cos[c + d*x]^2*Sin[c + d*x])/(3*a*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 7, ((3*a^4*A + 4*a^2*A*b^2 + 8*A*b^4 - 4*a^3*b*B - 8*a*b^3*B)*x)/(8*a^5) + (2*b^4*(A*b - a*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*Sqrt[a^2 - b^2]*d) - ((2*a^2*A*b + 3*A*b^3 - 2*a^3*B - 3*a*b^2*B)*Sin[c + d*x])/(3*a^4*d) + ((3*a^2*A + 4*A*b^2 - 4*a*b*B)*Cos[c + d*x]*Sin[c + d*x])/(8*a^3*d) - ((A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(3*a^2*d) + (A*Cos[c + d*x]^3*Sin[c + d*x])/(4*a*d)}


{Sec[c + d*x]^4*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 7, -(((4*a*A*b - 6*a^2*B - b^2*B)*ArcTanh[Sin[c + d*x]])/(2*b^4*d)) - (2*a^2*(2*a^2*A*b - 3*A*b^3 - 3*a^3*B + 4*a*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) + ((2*a^2*A*b - A*b^3 - 3*a^3*B + 2*a*b^2*B)*Tan[c + d*x])/(b^3*(a^2 - b^2)*d) - ((2*a*A*b - 3*a^2*B + b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)*d) + (a*(A*b - a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 6, ((A*b - 2*a*B)*ArcTanh[Sin[c + d*x]])/(b^3*d) + (2*a*(a^2*A*b - 2*A*b^3 - 2*a^3*B + 3*a*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) - ((a*A*b - 2*a^2*B + b^2*B)*Tan[c + d*x])/(b^2*(a^2 - b^2)*d) + (a*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 5, (B*ArcTanh[Sin[c + d*x]])/(b^2*d) + (2*(A*b^3 + a^3*B - 2*a*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) + (a*(A*b - a*B)*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 4, -((2*(a*A - b*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d)) - ((A*b - a*B)*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 3, (A*x)/a^2 + (2*(2*a^2*A*b - A*b^3 - a^3*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d) + (b*(A*b - a*B)*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 5, -(((2*A*b - a*B)*x)/a^3) - (2*b*(3*a^2*A*b - 2*A*b^3 - 2*a^3*B + a*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) + ((a^2*A - 2*A*b^2 + a*b*B)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 6, ((a^2*A + 6*A*b^2 - 4*a*b*B)*x)/(2*a^4) + (2*b^2*(4*a^2*A*b - 3*A*b^3 - 3*a^3*B + 2*a*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(3/2)*d) - ((2*a^2*A*b - 3*A*b^3 - a^3*B + 2*a*b^2*B)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2*A - 3*A*b^2 + 2*a*b*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 7, -(((2*a^2*A*b + 8*A*b^3 - a^3*B - 6*a*b^2*B)*x)/(2*a^5)) - (2*b^3*(5*a^2*A*b - 4*A*b^3 - 4*a^3*B + 3*a*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(3/2)*d) + ((2*a^4*A + 7*a^2*A*b^2 - 12*A*b^4 - 6*a^3*b*B + 9*a*b^3*B)*Sin[c + d*x])/(3*a^4*(a^2 - b^2)*d) - ((2*a^2*A*b - 4*A*b^3 - a^3*B + 3*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a^3*(a^2 - b^2)*d) + ((a^2*A - 4*A*b^2 + 3*a*b*B)*Cos[c + d*x]^2*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^5*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 8, -(((6*a*A*b - 12*a^2*B - b^2*B)*ArcTanh[Sin[c + d*x]])/(2*b^5*d)) - (a^2*(6*a^4*A*b - 15*a^2*A*b^3 + 12*A*b^5 - 12*a^5*B + 29*a^3*b^2*B - 20*a*b^4*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(5/2)*d) + ((6*a^4*A*b - 11*a^2*A*b^3 + 2*A*b^5 - 12*a^5*B + 21*a^3*b^2*B - 6*a*b^4*B)*Tan[c + d*x])/(2*b^4*(a^2 - b^2)^2*d) - ((3*a^3*A*b - 6*a*A*b^3 - 6*a^4*B + 10*a^2*b^2*B - b^4*B)*Sec[c + d*x]*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) + (a*(A*b - a*B)*Sec[c + d*x]^3*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (a*(2*a^2*A*b - 5*A*b^3 - 4*a^3*B + 7*a*b^2*B)*Sec[c + d*x]^2*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^4*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 7, ((A*b - 3*a*B)*ArcTanh[Sin[c + d*x]])/(b^4*d) + (a*(2*a^4*A*b - 5*a^2*A*b^3 + 6*A*b^5 - 6*a^5*B + 15*a^3*b^2*B - 12*a*b^4*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) - ((2*a^3*A*b - 5*a*A*b^3 - 6*a^4*B + 11*a^2*b^2*B - 2*b^4*B)*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) + (a*(A*b - a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (a*(a^2*A*b - 4*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 6, (B*ArcTanh[Sin[c + d*x]])/(b^3*d) - ((a^2*A*b^3 + 2*A*b^5 - 2*a^5*B + 5*a^3*b^2*B - 6*a*b^4*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) + (a*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (a*(3*A*b^3 + 2*a^3*B - 5*a*b^2*B)*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 5, ((3*a*A*b - a^2*B - 2*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) + (a*(A*b - a*B)*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((a^2*A*b + 2*A*b^3 + a^3*B - 4*a*b^2*B)*Tan[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 5, -(((2*a^2*A + A*b^2 - 3*a*b*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d)) - ((A*b - a*B)*Tan[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - ((3*a*A*b - a^2*B - 2*b^2*B)*Tan[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 4, (A*x)/a^3 + ((6*a^4*A*b - 5*a^2*A*b^3 + 2*A*b^5 - 2*a^5*B - a^3*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d) + (b*(A*b - a*B)*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b*(5*a^2*A*b - 2*A*b^3 - 3*a^3*B)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 6, -(((3*A*b - a*B)*x)/a^4) - (b*(12*a^4*A*b - 15*a^2*A*b^3 + 6*A*b^5 - 6*a^5*B + 5*a^3*b^2*B - 2*a*b^4*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) + ((2*a^4*A - 11*a^2*A*b^2 + 6*A*b^4 + 5*a^3*b*B - 2*a*b^3*B)*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b*(6*a^2*A*b - 3*A*b^3 - 4*a^3*B + a*b^2*B)*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 7, ((a^2*A + 12*A*b^2 - 6*a*b*B)*x)/(2*a^5) + (b^2*(20*a^4*A*b - 29*a^2*A*b^3 + 12*A*b^5 - 12*a^5*B + 15*a^3*b^2*B - 6*a*b^4*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(5/2)*d) - ((6*a^4*A*b - 21*a^2*A*b^3 + 12*A*b^5 - 2*a^5*B + 11*a^3*b^2*B - 6*a*b^4*B)*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^2*d) + ((a^4*A - 10*a^2*A*b^2 + 6*A*b^4 + 6*a^3*b*B - 3*a*b^3*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b*(7*a^2*A*b - 4*A*b^3 - 5*a^3*B + 2*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^5*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^4, x, 8, ((A*b - 4*a*B)*ArcTanh[Sin[c + d*x]])/(b^5*d) + (a*(2*a^6*A*b - 7*a^4*A*b^3 + 8*a^2*A*b^5 - 8*A*b^7 - 8*a^7*B + 28*a^5*b^2*B - 35*a^3*b^4*B + 20*a*b^6*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(7/2)*d) - ((6*a^5*A*b - 17*a^3*A*b^3 + 26*a*A*b^5 - 24*a^6*B + 68*a^4*b^2*B - 65*a^2*b^4*B + 6*b^6*B)*Tan[c + d*x])/(6*b^4*(a^2 - b^2)^3*d) + (a*(A*b - a*B)*Sec[c + d*x]^3*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (a*(a^2*A*b - 6*A*b^3 - 4*a^3*B + 9*a*b^2*B)*Sec[c + d*x]^2*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (a*(a^4*A*b - 2*a^2*A*b^3 + 6*A*b^5 - 4*a^5*B + 11*a^3*b^2*B - 12*a*b^4*B)*Sec[c + d*x]*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^4*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^4, x, 7, (B*ArcTanh[Sin[c + d*x]])/(b^4*d) + ((3*a^2*A*b^5 + 2*A*b^7 + 2*a^7*B - 7*a^5*b^2*B + 8*a^3*b^4*B - 8*a*b^6*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(7/2)*d) + (a*(A*b - a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - (a*(5*A*b^3 + 3*a^3*B - 8*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (a*(4*a^2*A*b^3 + 11*A*b^5 - 6*a^5*B + 17*a^3*b^2*B - 26*a*b^4*B)*Tan[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^4, x, 6, -(((a^3*A + 4*a*A*b^2 - 3*a^2*b*B - 2*b^3*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) + (a*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - (a*(a^2*A*b + 4*A*b^3 + 2*a^3*B - 7*a*b^2*B)*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((a^4*A*b - 10*a^2*A*b^3 - 6*A*b^5 + 2*a^5*B - 5*a^3*b^2*B + 18*a*b^4*B)*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^4, x, 6, ((4*a^2*A*b + A*b^3 - a^3*B - 4*a*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) + (a*(A*b - a*B)*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((2*a^2*A*b + 3*A*b^3 + a^3*B - 6*a*b^2*B)*Tan[c + d*x])/(6*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((2*a^3*A*b + 13*a*A*b^3 + a^4*B - 10*a^2*b^2*B - 6*b^4*B)*Tan[c + d*x])/(6*b*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^4, x, 6, -(((2*a^3*A + 3*a*A*b^2 - 4*a^2*b*B - b^3*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) - ((A*b - a*B)*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - ((5*a*A*b - 2*a^2*B - 3*b^2*B)*Tan[c + d*x])/(6*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - ((11*a^2*A*b + 4*A*b^3 - 2*a^3*B - 13*a*b^2*B)*Tan[c + d*x])/(6*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^4, x, 5, (A*x)/a^4 + ((8*a^6*A*b - 8*a^4*A*b^3 + 7*a^2*A*b^5 - 2*A*b^7 - 2*a^7*B - 3*a^5*b^2*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(7/2)*d) + (b*(A*b - a*B)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (b*(8*a^2*A*b - 3*A*b^3 - 5*a^3*B)*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (b*(26*a^4*A*b - 17*a^2*A*b^3 + 6*A*b^5 - 11*a^5*B - 4*a^3*b^2*B)*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^4, x, 7, -(((4*A*b - a*B)*x)/a^5) - (b*(20*a^6*A*b - 35*a^4*A*b^3 + 28*a^2*A*b^5 - 8*A*b^7 - 8*a^7*B + 8*a^5*b^2*B - 7*a^3*b^4*B + 2*a*b^6*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(7/2)*d) + ((6*a^6*A - 65*a^4*A*b^2 + 68*a^2*A*b^4 - 24*A*b^6 + 26*a^5*b*B - 17*a^3*b^3*B + 6*a*b^5*B)*Sin[c + d*x])/(6*a^4*(a^2 - b^2)^3*d) + (b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (b*(9*a^2*A*b - 4*A*b^3 - 6*a^3*B + a*b^2*B)*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (b*(12*a^4*A*b - 11*a^2*A*b^3 + 4*A*b^5 - 6*a^5*B + 2*a^3*b^2*B - a*b^4*B)*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^4, x, 8, ((a^2*A + 20*A*b^2 - 8*a*b*B)*x)/(2*a^6) + (b^2*(40*a^6*A*b - 84*a^4*A*b^3 + 69*a^2*A*b^5 - 20*A*b^7 - 20*a^7*B + 35*a^5*b^2*B - 28*a^3*b^4*B + 8*a*b^6*B)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^6*(a^2 - b^2)^(7/2)*d) - ((24*a^6*A*b - 146*a^4*A*b^3 + 167*a^2*A*b^5 - 60*A*b^7 - 6*a^7*B + 65*a^5*b^2*B - 68*a^3*b^4*B + 24*a*b^6*B)*Sin[c + d*x])/(6*a^5*(a^2 - b^2)^3*d) + ((a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A*b^6 + 12*a^5*b*B - 11*a^3*b^3*B + 4*a*b^5*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^3*d) + (b*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (b*(10*a^2*A*b - 5*A*b^3 - 7*a^3*B + 2*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (b*(48*a^4*A*b - 53*a^2*A*b^3 + 20*A*b^5 - 27*a^5*B + 20*a^3*b^2*B - 8*a*b^4*B)*Cos[c + d*x]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}


{(b*B/a + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 2, (b*B*x)/a^2 - (2*Sqrt[a^2 - b^2]*B*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*d)}
{(a*B/b + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 1, (B*x)/b}

{(a + b*Sec[c + d*x])/(b + a*Sec[c + d*x])^2, x, 3, (a*x)/b^2 - (2*Sqrt[a^2 - b^2]*ArcTan[((a - b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*d) - (a*Tan[c + d*x])/(b*d*(b + a*Sec[c + d*x]))}
{(3 + Sec[c + d*x])/(2 - Sec[c + d*x]), x, 2, (3*x)/2 + (5*ArcTanh[Sqrt[3]*Tan[(1/2)*(c + d*x)]])/(Sqrt[3]*d)}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (A+B Sec[c+d x]) (a+b Sec[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^4*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 9, (-2*(a + b)*(24*a^3*A*b + 57*a*A*b^3 - 16*a^4*B - 24*a^2*b^2*B + 147*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(24*a^3*A*b + 6*a^2*A*b^2 + 57*a*A*b^3 + 75*A*b^4 - 16*a^4*B - 4*a^3*b*B - 24*a^2*b^2*B + 111*a*b^3*B + 147*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(24*a^3*A*b + 57*a*A*b^3 - 16*a^4*B - 24*a^2*b^2*B + 147*b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(315*b^4*d) - (2*(12*a^2*A*b - 75*A*b^3 - 8*a^3*B - 13*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^3*d) + (2*(9*a*A*b - 6*a^2*B + 49*b^2*B)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^2*d) + (2*(9*A*b + a*B)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(63*b*d) + (2*B*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 8, (2*(a + b)*(14*a^2*A*b - 63*A*b^3 - 8*a^3*B - 19*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(14*a^2*A*b - 49*a*A*b^2 - 63*A*b^3 - 8*a^3*B - 2*a^2*b*B - 19*a*b^2*B - 25*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(14*a^2*A*b - 63*A*b^3 - 8*a^3*B - 19*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(105*b^3*d) + (2*(7*a*A*b - 4*a^2*B + 25*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b^2*d) + (2*(7*A*b + a*B)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*b*d) + (2*B*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 7, (-2*(a + b)*(5*a*A*b - 2*a^2*B + 9*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(5*a*A*b + 5*A*b^2 - 2*a^2*B + 7*a*b*B + 9*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(5*a*A*b - 2*a^2*B + 9*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(15*b^2*d) + (2*(5*A*b + a*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*b*d) + (2*B*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^1*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 6, (-2*(a + b)*(3*A*b + a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a*A + 3*A*b + a*B + b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b + a*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*b*d) + (2*B*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^0*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 7, -((2*(a + b)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(a*A - A*b - a*B - b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*B*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^1*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 8, (A*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b + a*B - b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b + 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 8, ((a + b)*(A*b + 4*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a*A - A*b + 4*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A - A*b^2 + 4*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d) + ((A*b + 4*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a*d)}
{Cos[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 9, ((a + b)*(16*a^2*A - 3*A*b^2 + 6*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((14*a*A*b - A*b^2 + 12*a^2*B - 6*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A*b + A*b^3 + 8*a^3*B - 2*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((A*b + 6*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*a*d) + (A*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d) + ((16*a^2*A - 3*A*b^2 + 6*a*b*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a^2*d)}


{Sec[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 9, (2*(a + b)*(18*a^3*A*b - 246*a*A*b^3 - 8*a^4*B - 33*a^2*b^2*B - 147*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(18*a^3*A*b - 153*a^2*A*b^2 - 246*a*A*b^3 - 75*A*b^4 - 8*a^4*B - 2*a^3*b*B - 33*a^2*b^2*B - 186*a*b^3*B - 147*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(18*a^3*A*b - 246*a*A*b^3 - 8*a^4*B - 33*a^2*b^2*B - 147*b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(315*b^3*d) + (2*(9*a^2*A*b + 75*A*b^3 - 4*a^3*B + 88*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^2*d) + (2*(72*a*A*b + 3*a^2*B + 49*b^2*B)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b*d) + (2*(9*A*b + 10*a*B)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(63*d) + (2*b*B*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 8, (-2*(a + b)*(21*a^2*A*b + 63*A*b^3 - 6*a^3*B + 82*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(21*a^2*A*b + 84*a*A*b^2 + 63*A*b^3 - 6*a^3*B + 51*a^2*b*B + 82*a*b^2*B + 25*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(21*a^2*A*b + 63*A*b^3 - 6*a^3*B + 82*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(105*b^2*d) + (2*(42*a*A*b + 3*a^2*B + 25*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b*d) + (2*(7*A*b + 8*a*B)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*d) + (2*b*B*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^1*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 7, -((2*(a + b)*(20*a*A*b + 3*a^2*B + 9*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(15*a^2*A + 20*a*A*b + 5*A*b^2 + 3*a^2*B + 12*a*b*B + 9*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(20*a*A*b + 3*a^2*B + 9*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*b*d) + (2*(5*A*b + 3*a*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*d) + (2*B*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^0*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 8, (-2*(a + b)*(3*A*b + 4*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a^2*A - 6*a*A*b - 3*A*b^2 - 3*a^2*B - 4*a*b*B - b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^2*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b + 4*a*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*d) + (2*b*B*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^1*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 8, ((a + b)*(a*A - 2*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a*A*b - A*b^2 + a^2*B - 2*a*b*B - b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(3*A*b + 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*B*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d + ((a*A - 2*b*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 8, ((a + b)*(5*A*b + 4*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a^2*A - a*A*b + 4*A*b^2 + 8*a*b*B - 4*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 3*A*b^2 + 12*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d) + ((5*A*b + 4*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 9, ((a + b)*(16*a^2*A + 3*A*b^2 + 30*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((26*a*A*b - 7*A*b^2 + 12*a^2*B - 6*a*b*B + 24*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((12*a^2*A*b - A*b^3 + 8*a^3*B + 6*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((7*A*b + 6*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*d) + (a*A*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d) + ((16*a^2*A + 3*A*b^2 + 30*a*b*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a*d)}


{Sec[c + d*x]^3*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 10, (2*(a + b)*(110*a^4*A*b - 3069*a^2*A*b^3 - 1617*A*b^5 - 40*a^5*B - 255*a^3*b^2*B - 3705*a*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3465*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(110*a^4*A*b - 1705*a^3*A*b^2 - 3069*a^2*A*b^3 - 2871*a*A*b^4 - 1617*A*b^5 - 40*a^5*B - 10*a^4*b*B - 255*a^3*b^2*B - 3315*a^2*b^3*B - 3705*a*b^4*B - 675*b^5*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3465*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(110*a^4*A*b - 3069*a^2*A*b^3 - 1617*A*b^5 - 40*a^5*B - 255*a^3*b^2*B - 3705*a*b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3465*b^3*d) + (2*(55*a^3*A*b + 1793*a*A*b^3 - 20*a^4*B + 1025*a^2*b^2*B + 675*b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3465*b^2*d) + (2*(825*a^2*A*b + 539*A*b^3 + 15*a^3*B + 1145*a*b^2*B)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3465*b*d) + (2*(209*a*A*b + 113*a^2*B + 81*b^2*B)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(693*d) + (2*b*(11*A*b + 14*a*B)*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(99*d) + (2*b*B*Sec[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(11*d)}
{Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 9, (-2*(a + b)*(45*a^3*A*b + 435*a*A*b^3 - 10*a^4*B + 279*a^2*b^2*B + 147*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(45*a^3*A*b + 405*a^2*A*b^2 + 435*a*A*b^3 + 75*A*b^4 - 10*a^4*B + 155*a^3*b*B + 279*a^2*b^2*B + 261*a*b^3*B + 147*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(45*a^3*A*b + 435*a*A*b^3 - 10*a^4*B + 279*a^2*b^2*B + 147*b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(315*b^2*d) + (2*(135*a^2*A*b + 75*A*b^3 + 5*a^3*B + 163*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b*d) + (2*(135*a*A*b + 75*a^2*B + 49*b^2*B)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*d) + (2*b*(3*A*b + 4*a*B)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(21*d) + (2*b*B*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^1*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 8, -((2*(a + b)*(161*a^2*A*b + 63*A*b^3 + 15*a^3*B + 145*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(105*a^3*A + 161*a^2*A*b + 119*a*A*b^2 + 63*A*b^3 + 15*a^3*B + 135*a^2*b*B + 145*a*b^2*B + 25*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(161*a^2*A*b + 63*A*b^3 + 15*a^3*B + 145*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*b*d) + (2*(56*a*A*b + 15*a^2*B + 25*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*d) + (2*(7*A*b + 5*a*B)*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(35*d) + (2*B*(a + b*Sec[c + d*x])^(5/2)*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^0*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 9, (-2*(a + b)*(35*a*A*b + 23*a^2*B + 9*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(15*a^3*A - 45*a^2*A*b - 35*a*A*b^2 - 5*A*b^3 - 15*a^3*B - 23*a^2*b*B - 17*a*b^2*B - 9*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^3*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(35*a*A*b + 23*a^2*B + 9*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(15*d) + (2*b*(5*A*b + 8*a*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*d) + (2*b*B*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{Cos[c + d*x]^1*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 9, ((a + b)*(3*a^2*A - 6*A*b^2 - 14*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(9*a^2*A*b - 9*a*A*b^2 - 3*A*b^3 + 3*a^3*B - 9*a^2*b*B - 7*a*b^2*B - b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a^2*(5*A*b + 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*(3*a*A - 2*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*b*B*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) - ((3*a^2*A - 6*A*b^2 - 14*a*b*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d)}
{Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 9, ((a + b)*(9*a*A*b + 4*a^2*B - 8*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a^3*A - a^2*A*b + 12*a*A*b^2 - 4*A*b^3 + 12*a^2*b*B - 12*a*b^2*B - 4*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*(4*a^2*A + 15*A*b^2 + 20*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*(7*A*b + 4*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (a*A*Cos[c + d*x]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(2*d) - ((9*a*A*b + 4*a^2*B - 8*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 9, ((a + b)*(16*a^2*A + 33*A*b^2 + 54*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((38*a^2*A*b - 13*a*A*b^2 + 24*A*b^3 + 12*a^3*B - 6*a^2*b*B + 72*a*b^2*B - 24*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((20*a^2*A*b + 5*A*b^3 + 8*a^3*B + 30*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*(3*A*b + 2*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (a*A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + ((16*a^2*A + 33*A*b^2 + 54*a*b*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d)}
{Cos[c + d*x]^4*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 10, ((a + b)*(284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(192*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((72*a^3*A - 36*a^2*A*b + 322*a*A*b^2 - 59*A*b^3 + 304*a^2*b*B - 104*a*b^2*B + 192*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(96*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^4*A + 120*a^2*A*b^2 - 5*A*b^4 + 160*a^3*b*B + 40*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(32*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((36*a^2*A + 59*A*b^2 + 104*a*b*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(96*d) + (a*(11*A*b + 8*a*B)*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + (a*A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(4*d) + ((284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*a*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^3*(A + B*Sec[c + d*x])/Sqrt[a + b*Sec[c + d*x]], x, 7, (2*(a + b)*(10*a*A*b - 8*a^2*B - 9*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(10*a*A*b - 5*A*b^2 - 8*a^2*B - 2*a*b*B - 9*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(10*a*A*b - 8*a^2*B - 9*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(15*b^3*d) + (2*(5*A*b - 4*a*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*b^2*d) + (2*B*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*b*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x])/Sqrt[a + b*Sec[c + d*x]], x, 6, (-2*(a + b)*(3*A*b - 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b - 2*a*B + b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b - 2*a*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*b^2*d) + (2*B*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])/Sqrt[a + b*Sec[c + d*x]], x, 5, (-2*(a + b)*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A + B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*B*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(b*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])/Sqrt[a + b*Sec[c + d*x]], x, 4, (-2*(A - B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])/Sqrt[a + b*Sec[c + d*x]], x, 8, (A*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*B*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])/Sqrt[a + b*Sec[c + d*x]], x, 8, -(((a + b)*(3*A*b - 4*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (A*(2*a - b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 3*A*b^2 - 4*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*a*d) - ((3*A*b - 4*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a^2*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x])/Sqrt[a + b*Sec[c + d*x]], x, 9, ((a + b)*(16*a^2*A + 15*A*b^2 - 18*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a*A*b + 5*A*b^2 + 12*a^2*B - 6*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((4*a^2*A*b + 5*A*b^3 - 8*a^3*B - 6*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((5*A*b - 6*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*a^2*d) + (A*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a*d) + ((16*a^2*A + 15*A*b^2 - 18*a*b*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a^3*d)}


{Sec[c + d*x]^3*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(3/2), x, 7, (-2*(6*a^2*A*b - 3*A*b^3 - 8*a^3*B + 5*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(6*a*A*b - 3*A*b^2 - 8*a^2*B + 6*a*b*B - b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(6*a^2*A*b - 3*A*b^3 - 8*a^3*B + 5*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*b^3*(a^2 - b^2)*d) + (2*a*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a*A*b - 4*a^2*B + b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(3/2), x, 6, (2*(a*A*b - 2*a^2*B + b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/((a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - 2*a*B + b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/((a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a*A*b - 2*a^2*B + b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(b^2*(a^2 - b^2)*d) + (2*a*(A*b - a*B)*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(3/2), x, 5, (-2*(A*b - a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/((a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A - B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b - a*B)*Tan[(c + d*x)/2])/(b*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*(A*b - a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A - B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Tan[(1/2)*(c + d*x)])/(a*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(3/2), x, 8, ((a^2*A - 3*A*b^2 + 2*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b - a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*A*b - 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((a^2*A - 3*A*b^2 + 2*a*b*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(3/2), x, 9, -(((7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^3*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((2*a^2*A - 3*a*A*b + 5*A*b^2 - 4*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 15*A*b^2 - 12*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((a^2*A - 5*A*b^2 + 4*a*b*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)*d) - ((7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a^3*(a^2 - b^2)*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(3/2), x, 10, ((16*a^4*A + 41*a^2*A*b^2 - 105*A*b^4 - 42*a^3*b*B + 90*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a^4*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((10*a^2*A*b - 21*a*A*b^2 + 35*A*b^3 - 12*a^3*B + 18*a^2*b*B - 30*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a^3*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((12*a^2*A*b + 35*A*b^3 - 8*a^3*B - 30*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - ((11*a^2*A*b - 35*A*b^3 - 6*a^3*B + 30*a*b^2*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*a^3*(a^2 - b^2)*d) + ((a^2*A - 7*A*b^2 + 6*a*b*B)*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + ((16*a^4*A + 41*a^2*A*b^2 - 105*A*b^4 - 42*a^3*b*B + 90*a*b^3*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a^4*(a^2 - b^2)*d)}


{Sec[c + d*x]^4*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(5/2), x, 8, (-2*(8*a^4*A*b - 15*a^2*A*b^3 + 3*A*b^5 - 16*a^5*B + 28*a^3*b^2*B - 8*a*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^4*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(8*a^3*A*b - 6*a^2*A*b^2 - 9*a*A*b^3 + 3*A*b^4 - 16*a^4*B + 12*a^3*b*B + 16*a^2*b^2*B - 9*a*b^3*B + b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(8*a^4*A*b - 15*a^2*A*b^3 + 3*A*b^5 - 16*a^5*B + 28*a^3*b^2*B - 8*a*b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*b^4*(a^2 - b^2)^2*d) + (2*a*(A*b - a*B)*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*a*(3*a^2*A*b - 7*A*b^3 - 6*a^3*B + 10*a*b^2*B)*Sec[c + d*x]*Tan[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(4*a^3*A*b - 8*a*A*b^3 - 8*a^4*B + 13*a^2*b^2*B - b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Sec[c + d*x]^3*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(5/2), x, 7, (2*(2*a^3*A*b - 6*a*A*b^3 - 8*a^4*B + 15*a^2*b^2*B - 3*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^2*A*b - 3*a*A*b^2 - 3*A*b^3 - 8*a^3*B + 6*a^2*b*B + 9*a*b^2*B - 3*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^3*A*b - 6*a*A*b^3 - 8*a^4*B + 15*a^2*b^2*B - 3*b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*b^3*(a^2 - b^2)^2*d) + (2*a*(A*b - a*B)*Sec[c + d*x]*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*a*(a^2*A*b - 5*A*b^3 - 4*a^3*B + 8*a*b^2*B)*Tan[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(5/2), x, 6, (2*(a^2*A*b + 3*A*b^3 + 2*a^3*B - 6*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a*A*b + 3*A*b^2 + 2*a^2*B - 3*a*b*B - 3*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a^2*A*b + 3*A*b^3 + 2*a^3*B - 6*a*b^2*B)*Tan[(c + d*x)/2])/(3*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(5/2), x, 6, (-2*(4*a*A*b - a^2*B - 3*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a*A + A*b - a*B - 3*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(4*a*A*b - a^2*B - 3*b^2*B)*Tan[(c + d*x)/2])/(3*(a - b)*b*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(7*a^2*A*b - 3*A*b^3 - 4*a^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a^2*A + 3*a*A*b - 2*A*b^2 - 3*a^2*B - a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(7*a^2*A*b - 3*A*b^3 - 4*a^3*B)*Tan[(c + d*x)/2])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(5/2), x, 9, ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(6*a^2*A*b + 3*a*A*b^2 - 5*A*b^3 - 3*a^3*B - 3*a^2*b*B + 2*a*b^2*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(5*A*b - 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*b*(9*a^2*A*b - 5*A*b^3 - 6*a^3*B + 2*a*b^2*B)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(5/2), x, 10, -(((33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a^4*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((6*a^4*A - 9*a^3*A*b + 33*a^2*A*b^2 + 21*a*A*b^3 - 35*A*b^4 - 24*a^3*b*B - 12*a^2*b^2*B + 20*a*b^3*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(6*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 35*A*b^2 - 20*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*b*(11*a^2*A*b - 7*A*b^3 - 8*a^3*B + 4*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^4*A - 54*a^2*A*b^2 + 35*A*b^4 + 36*a^3*b*B - 20*a*b^3*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^2*d) - ((33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(12*a^4*(a^2 - b^2)^2*d)}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+B Sec[c+d x]) (a+b Sec[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 7, -((2*(5*a*A + 3*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(5*a*A + 3*b*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(A*b + a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d) + (2*b*B*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 6, -((2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d) + (2*(3*a*A + b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(A*b + a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d + (2*b*B*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 5, (2*(a*A - b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*b*B*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/d}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 5, (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(a*A + 3*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*a*A*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 6, (2*(3*a*A + 5*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*a*A*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*(A*b + a*B)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-7/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x]), x, 7, (6*(A*b + a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(5*a*A + 7*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*a*A*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (2*(A*b + a*B)*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*(5*a*A + 7*b*B)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 8, -((2*(5*a^2*A + 3*A*b^2 + 6*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(5*a^2*A + 3*A*b^2 + 6*a*b*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*b*(7*A*b + 9*a*B)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*b*B*Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 7, -((2*(10*a*A*b + 5*a^2*B + 3*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(3*a^2*A + A*b^2 + 2*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(10*a*A*b + 5*a^2*B + 3*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*b*(5*A*b + 7*a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*b*B*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 6, (2*(a^2*A - A*b^2 - 2*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(6*a*A*b + 3*a^2*B + b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*b*(3*A*b + 5*a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*b*B*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 6, (2*(2*a*A*b + a^2*B - b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(a^2*A + 3*A*b^2 + 6*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(a*A - 3*b*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a*A*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 6, (2*(3*a^2*A + 5*A*b^2 + 10*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(2*a*A*b + a^2*B + 3*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*a*(7*A*b + 5*a*B)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{Sec[c + d*x]^(-7/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 7, (2*(6*a*A*b + 3*a^2*B + 5*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*a*(9*A*b + 7*a*B)*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{Sec[c + d*x]^(-9/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^2, x, 8, (2*(7*a^2*A + 9*A*b^2 + 18*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*a*(11*A*b + 9*a*B)*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*(7*a^2*A + 9*A*b^2 + 18*a*b*B)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Sec[c + d*x])*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}


{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 9, -((2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*b*(144*a*A*b + 89*a^2*B + 49*b^2*B)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (2*b*(9*A*b + 13*a*B)*Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(63*d) + (2*b*B*Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(9*d)}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 8, -((2*(15*a^2*A*b + 3*A*b^3 + 5*a^3*B + 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(21*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 5*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(15*a^2*A*b + 3*A*b^3 + 5*a^3*B + 9*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*b*(84*a*A*b + 57*a^2*B + 25*b^2*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (2*b*(7*A*b + 11*a*B)*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(35*d) + (2*b*B*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 7, (2*(5*a^3*A - 15*a*A*b^2 - 15*a^2*b*B - 3*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(9*a^2*A*b + A*b^3 + 3*a^3*B + 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*b*(40*a*A*b + 33*a^2*B + 9*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*b*(5*A*b + 9*a*B)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d) + (2*b*B*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 7, (2*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(a^3*A + 9*a*A*b^2 + 9*a^2*b*B + b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(a^2*A - 3*A*b^2 - 8*a*b*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) - (2*b*(a*A - b*B)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d) + (2*a*A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 7, (2*(3*a^3*A + 15*a*A*b^2 + 15*a^2*b*B - 5*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(3*a^2*A*b + 3*A*b^3 + a^3*B + 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(12*a*A*b + 5*a^2*B - 15*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*a*(9*A*b + 5*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{Sec[c + d*x]^(-7/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 7, (2*(9*a^2*A*b + 5*A*b^3 + 3*a^3*B + 15*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(5*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 21*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*a*(25*a^2*A + 57*A*b^2 + 84*a*b*B)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (2*a*(11*A*b + 7*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*a*A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{Sec[c + d*x]^(-9/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 8, (2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*a*(49*a^2*A + 89*A*b^2 + 144*a*b*B)*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*a*(13*A*b + 9*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*a*A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}
{Sec[c + d*x]^(-11/2)*(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^3, x, 9, (2*(21*a^2*A*b + 9*A*b^3 + 7*a^3*B + 27*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*a*(81*a^2*A + 129*A*b^2 + 220*a*b*B)*Sin[c + d*x])/(693*d*Sec[c + d*x]^(5/2)) + (2*(21*a^2*A*b + 9*A*b^3 + 7*a^3*B + 27*a*b^2*B)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]]) + (2*a*(15*A*b + 11*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(99*d*Sec[c + d*x]^(7/2)) + (2*a*A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(11*d*Sec[c + d*x]^(9/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^(7/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 10, (2*(5*a*A*b - 5*a^2*B - 3*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*b^3*d) + (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^2*d) + (2*a^2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a + b)*d) - (2*(5*a*A*b - 5*a^2*B - 3*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*b^3*d) + (2*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b^2*d) + (2*B*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*b*d)}
{Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 9, -((2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*d)) + (2*B*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b*d) - (2*a*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a + b)*d) + (2*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b^2*d) + (2*B*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*d)}
{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 7, -((2*B*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*d)) + (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*(a + b)*d) + (2*B*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b*d)}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 5, (2*A*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d) - (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a + b)*d)}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 7, (2*A*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d) - (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*d) + (2*b*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a + b)*d)}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 8, -((2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*d)) + (2*(a^2*A + 3*A*b^2 - 3*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^3*d) - (2*b^2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a + b)*d) + (2*A*Sin[c + d*x])/(3*a*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x]), x, 9, (2*(3*a^2*A + 5*A*b^2 - 5*a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*a^3*d) - (2*(a^2*A*b + 3*A*b^3 - a^3*B - 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^4*d) + (2*b^3*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^4*(a + b)*d) + (2*A*Sin[c + d*x])/(5*a*d*Sec[c + d*x]^(3/2)) - (2*(A*b - a*B)*Sin[c + d*x])/(3*a^2*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(7/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 10, -(((3*a^2*A*b - 2*A*b^3 - 5*a^3*B + 4*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d)) - ((3*a*A*b - 5*a^2*B + 2*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^2*(a^2 - b^2)*d) - (a*(3*a^2*A*b - 5*A*b^3 - 5*a^3*B + 7*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^3*(a + b)^2*d) + ((3*a^2*A*b - 2*A*b^3 - 5*a^3*B + 4*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) - ((3*a*A*b - 5*a^2*B + 2*b^2*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) + (a*(A*b - a*B)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 9, ((a*A*b - 3*a^2*B + 2*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d) + ((A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*(a^2 - b^2)*d) + ((a^2*A*b - 3*A*b^3 - 3*a^3*B + 5*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*(a + b)^2*d) - ((a*A*b - 3*a^2*B + 2*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b^2*(a^2 - b^2)*d) + (a*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 8, -(((A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*(a^2 - b^2)*d)) - ((A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a^2 - b^2)*d) + ((a^2*A*b + A*b^3 + a^3*B - 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a - b)*b*(a + b)^2*d) + (a*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 8, ((A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a^2 - b^2)*d) + ((2*a^2*A - A*b^2 - a*b*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d) - ((3*a^2*A*b - A*b^3 - a^3*B - a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*(a + b)^2*d) - ((A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 8, ((2*a^2*A - 3*A*b^2 + a*b*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d) - ((4*a^2*A*b - 3*A*b^3 - 2*a^3*B + a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d) + (b*(5*a^2*A*b - 3*A*b^3 - 3*a^3*B + a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a - b)*(a + b)^2*d) + (b*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^2, x, 9, -(((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d)) + ((2*a^4*A + 16*a^2*A*b^2 - 15*A*b^4 - 12*a^3*b*B + 9*a*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^4*(a^2 - b^2)*d) - (b^2*(7*a^2*A*b - 5*A*b^3 - 5*a^3*B + 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^4*(a - b)*(a + b)^2*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]) + (b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^(9/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 11, -(((15*a^4*A*b - 29*a^2*A*b^3 + 8*A*b^5 - 35*a^5*B + 65*a^3*b^2*B - 24*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^4*(a^2 - b^2)^2*d)) - ((15*a^3*A*b - 33*a*A*b^3 - 35*a^4*B + 61*a^2*b^2*B - 8*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*b^3*(a^2 - b^2)^2*d) - (a*(15*a^4*A*b - 38*a^2*A*b^3 + 35*A*b^5 - 35*a^5*B + 86*a^3*b^2*B - 63*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^4*(a + b)^3*d) + ((15*a^4*A*b - 29*a^2*A*b^3 + 8*A*b^5 - 35*a^5*B + 65*a^3*b^2*B - 24*a*b^4*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b^4*(a^2 - b^2)^2*d) - ((15*a^3*A*b - 33*a*A*b^3 - 35*a^4*B + 61*a^2*b^2*B - 8*b^4*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d) + (a*(A*b - a*B)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (a*(3*a^2*A*b - 9*A*b^3 - 7*a^3*B + 13*a*b^2*B)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(7/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 10, ((3*a^3*A*b - 9*a*A*b^3 - 15*a^4*B + 29*a^2*b^2*B - 8*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d) + ((a^2*A*b - 7*A*b^3 - 5*a^3*B + 11*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^2*(a^2 - b^2)^2*d) + ((3*a^4*A*b - 6*a^2*A*b^3 + 15*A*b^5 - 15*a^5*B + 38*a^3*b^2*B - 35*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^3*(a + b)^3*d) - ((3*a^3*A*b - 9*a*A*b^3 - 15*a^4*B + 29*a^2*b^2*B - 8*b^4*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b^3*(a^2 - b^2)^2*d) + (a*(A*b - a*B)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (a*(a^2*A*b - 7*A*b^3 - 5*a^3*B + 11*a*b^2*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 9, ((a^2*A*b + 5*A*b^3 + 3*a^3*B - 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^2*(a^2 - b^2)^2*d) + ((3*a^2*A*b + 3*A*b^3 + a^3*B - 7*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*b*(a^2 - b^2)^2*d) + ((a^4*A*b - 10*a^2*A*b^3 - 3*A*b^5 + 3*a^5*B - 6*a^3*b^2*B + 15*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*(a - b)^2*b^2*(a + b)^3*d) + (a*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (a*(a^2*A*b + 5*A*b^3 + 3*a^3*B - 9*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 9, -(((5*a^2*A*b + A*b^3 - a^3*B - 5*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*b*(a^2 - b^2)^2*d)) - ((7*a^2*A*b - A*b^3 - 3*a^3*B - 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a^2 - b^2)^2*d) + ((3*a^4*A*b + 10*a^2*A*b^3 - A*b^5 + a^5*B - 10*a^3*b^2*B - 3*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a - b)^2*b*(a + b)^3*d) + (a*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((3*a^2*A*b + 3*A*b^3 + a^3*B - 7*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 9, ((9*a^2*A*b - 3*A*b^3 - 5*a^3*B - a*b^2*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a^2 - b^2)^2*d) + ((8*a^4*A - 5*a^2*A*b^2 + 3*A*b^4 - 7*a^3*b*B + a*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d) - ((15*a^4*A*b - 6*a^2*A*b^3 + 3*A*b^5 - 3*a^5*B - 10*a^3*b^2*B + a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a - b)^2*(a + b)^3*d) - ((A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - ((7*a^2*A*b - A*b^3 - 3*a^3*B - 3*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 9, ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d) - ((24*a^4*A*b - 33*a^2*A*b^3 + 15*A*b^5 - 8*a^5*B + 5*a^3*b^2*B - 3*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d) + (b*(35*a^4*A*b - 38*a^2*A*b^3 + 15*A*b^5 - 15*a^5*B + 6*a^3*b^2*B - 3*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a - b)^2*(a + b)^3*d) + (b*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b*(11*a^2*A*b - 5*A*b^3 - 7*a^3*B + a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^3, x, 10, -(((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d)) + ((8*a^6*A + 128*a^4*A*b^2 - 223*a^2*A*b^4 + 105*A*b^6 - 72*a^5*b*B + 99*a^3*b^3*B - 45*a*b^5*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*a^5*(a^2 - b^2)^2*d) - (b^2*(63*a^4*A*b - 86*a^2*A*b^3 + 35*A*b^5 - 35*a^5*B + 38*a^3*b^2*B - 15*a*b^4*B)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^5*(a - b)^2*(a + b)^3*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]]) + (b*(A*b - a*B)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2) + (b*(13*a^2*A*b - 7*A*b^3 - 9*a^3*B + 3*a*b^2*B)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+B Sec[c+d x]) (a+b Sec[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 11, -((a + b)*(4*A*b + a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*a*A*b - a^2*B + 4*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*A*b + a*B)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b*d) + (B*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d)}
{Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 10, -(((a + b)*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])) + ((2*a*A + b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b + a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (B*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]))/Sqrt[Sec[c + d*x]], x, 9, (2*A*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(3/2), x, 7, (2*(a + b)*(A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(5/2), x, 8, (2*(a + b)*(9*a^2*A - 2*A*b^2 + 5*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^2*A*b - 2*A*b^3 - 5*a^3*B + 5*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*(A*b + 5*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a*d*Sqrt[Sec[c + d*x]])}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(7/2), x, 9, (2*(a + b)*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 17*a^2*A*b^2 - 8*A*b^4 - 14*a^3*b*B + 14*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (2*(A*b + 7*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*a*d*Sec[c + d*x]^(3/2)) + (2*(25*a^2*A - 4*A*b^2 + 7*a*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a^2*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 12, -((a + b)*(30*a*A*b + 3*a^2*B + 16*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((42*a*A*b + 17*a^2*B + 16*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Sec[c + d*x]]) + ((6*a^2*A*b + 8*A*b^3 - a^3*B + 12*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(8*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((30*a*A*b + 3*a^2*B + 16*b^2*B)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*b*d) + ((6*A*b + 7*a*B)*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*d) + (b*B*Sec[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 11, -((a + b)*(4*A*b + 5*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((8*a^2*A + 4*A*b^2 + 7*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((12*a*A*b + 3*a^2*B + 4*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*A*b + 5*a*B)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (b*B*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d)}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]))/Sqrt[Sec[c + d*x]], x, 10, ((a + b)*(2*a*A - b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + ((2*a*A*b + 2*a^2*B + b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (b*(2*A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (b*B*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(3/2), x, 10, (2*(a + b)*(4*A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - A*b^2 + 3*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(5/2), x, 8, (2*(a + b)*(9*a^2*A + 3*A*b^2 + 20*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2*A*b - 3*A*b^3 + 5*a^3*B - 5*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*(6*A*b + 5*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]])}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(7/2), x, 9, (2*(a + b)*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 31*a^2*A*b^2 + 6*A*b^4 + 21*a^3*b*B - 21*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (2*(8*A*b + 7*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*(25*a^2*A + 3*A*b^2 + 42*a*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a*d*Sqrt[Sec[c + d*x]])}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(9/2), x, 10, (2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(39*a^4*A*b - 31*a^2*A*b^3 - 8*A*b^5 + 75*a^5*B - 93*a^3*b^2*B + 18*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2)) + (2*(10*A*b + 9*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d*Sec[c + d*x]^(3/2)) + (2*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a^2*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 13, -((a + b)*(264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(192*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((472*a^2*A*b + 128*A*b^3 + 133*a^3*B + 356*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(192*d*Sqrt[a + b*Sec[c + d*x]]) + ((40*a^3*A*b + 160*a*A*b^3 - 5*a^4*B + 120*a^2*b^2*B + 48*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(64*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(192*b*d) + ((104*a*A*b + 59*a^2*B + 36*b^2*B)*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(96*d) + (b*(8*A*b + 11*a*B)*Sec[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + (b*B*Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(4*d)}
{Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 12, -((a + b)*(54*a*A*b + 33*a^2*B + 16*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^3*A + 66*a*A*b^2 + 59*a^2*b*B + 16*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Sec[c + d*x]]) + ((30*a^2*A*b + 8*A*b^3 + 5*a^3*B + 20*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(8*d*Sqrt[a + b*Sec[c + d*x]]) + ((54*a*A*b + 33*a^2*B + 16*b^2*B)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + (b*(2*A*b + 3*a*B)*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (b*B*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d)}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]))/Sqrt[Sec[c + d*x]], x, 11, ((a + b)*(8*a^2*A - 4*A*b^2 - 9*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((16*a^2*A*b + 4*A*b^3 + 8*a^3*B + 11*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + (b*(20*a*A*b + 15*a^2*B + 4*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + (b*(4*A*b + 7*a*B)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (b*B*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(2*d)}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(3/2), x, 11, ((a + b)*(14*a*A*b + 6*a^2*B - 3*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + ((2*a^3*A + 4*a*A*b^2 + 12*a^2*b*B + 3*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + (b^2*(2*A*b + 5*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) - (b*(2*a*A - 3*b*B)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a*A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(5/2), x, 11, (2*(a + b)*(9*a^2*A + 23*A*b^2 + 35*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(8*a^2*A*b - 8*A*b^3 + 5*a^3*B + 10*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^3*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(8*A*b + 5*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(7/2), x, 9, (2*(a + b)*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 10*a^2*A*b^2 - 15*A*b^4 + 56*a^3*b*B - 56*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(10*A*b + 7*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*(25*a^2*A + 45*A*b^2 + 77*a*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(9/2), x, 10, (2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(114*a^4*A*b - 124*a^2*A*b^3 + 10*A*b^5 + 75*a^5*B - 30*a^3*b^2*B - 45*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(4*A*b + 3*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(21*d*Sec[c + d*x]^(5/2)) + (2*(49*a^2*A + 75*A*b^2 + 135*a*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (2*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(11/2), x, 11, (2*(a + b)*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3465*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(675*a^6*A - 390*a^4*A*b^2 - 245*a^2*A*b^4 - 40*A*b^6 + 1254*a^5*b*B - 1364*a^3*b^3*B + 110*a*b^5*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3465*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(14*A*b + 11*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(99*d*Sec[c + d*x]^(7/2)) + (2*(81*a^2*A + 113*A*b^2 + 209*a*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(693*d*Sec[c + d*x]^(5/2)) + (2*(1145*a^2*A*b + 15*A*b^3 + 539*a^3*B + 825*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3465*a*d*Sec[c + d*x]^(3/2)) + (2*(675*a^4*A + 1025*a^2*A*b^2 - 20*A*b^4 + 1793*a^3*b*B + 55*a*b^3*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3465*a^2*d*Sqrt[Sec[c + d*x]]) + (2*a*A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(11*d*Sec[c + d*x]^(9/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x]))/Sqrt[a + b*Sec[c + d*x]], x, 11, -((a + b)*(4*A*b - 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Sec[c + d*x]]) - ((4*a*A*b - 3*a^2*B - 4*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*A*b - 3*a*B)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b^2*d) + (B*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*b*d)}
{(Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x]))/Sqrt[a + b*Sec[c + d*x]], x, 10, -(((a + b)*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]])) + (B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]]) + (B*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b*d)}
{(Sqrt[Sec[c + d*x]]*(A + B*Sec[c + d*x]))/Sqrt[a + b*Sec[c + d*x]], x, 6, (2*A*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]), x, 6, (2*A*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]), x, 7, (-2*(a + b)*(2*A*b - 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A + 2*A*b^2 - 3*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a*d*Sqrt[Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Sec[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]), x, 8, (2*(a + b)*(9*a^2*A + 8*A*b^2 - 10*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^3*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(7*a^2*A*b + 8*A*b^3 - 5*a^3*B - 10*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a*d*Sec[c + d*x]^(3/2)) - (2*(4*A*b - 5*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^2*d*Sqrt[Sec[c + d*x]])}


{(Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(3/2), x, 11, ((2*a*A*b - 3*a^2*B + b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*d*Sqrt[a + b*Sec[c + d*x]]) + (B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b - 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - ((2*a*A*b - 3*a^2*B + b^2*B)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b^2*(a^2 - b^2)*d)}
{(Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(3/2), x, 8, (-2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/((a - b)*b*d*Sqrt[a + b*Sec[c + d*x]]) + (2*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{(Sqrt[Sec[c + d*x]]*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)), x, 7, (2*(a^2*A - 2*A*b^2 + a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)), x, 8, (-2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A + 8*A*b^2 - 6*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - 4*A*b^2 + 3*a*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)), x, 9, (2*(9*a^4*A + 24*a^2*A*b^2 - 48*A*b^4 - 25*a^3*b*B + 40*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^4*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(12*a^2*A*b + 48*A*b^3 - 5*a^3*B - 40*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^4*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - 6*A*b^2 + 5*a*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)) - (2*(9*a^2*A*b - 24*A*b^3 - 5*a^3*B + 20*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{(Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(5/2), x, 11, (2*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) - (2*a*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{(Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(5/2), x, 8, -((2*(3*a^2*A + A*b^2 - 4*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])) - (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(2*a^2*A*b + 2*A*b^3 + a^3*B - 5*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{(Sqrt[Sec[c + d*x]]*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2*A - 2*A*b^2 - a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) - (2*(5*a^2*A*b - A*b^3 - 2*a^3*B - 2*a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(5/2)), x, 8, (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(9*a^2*A*b - 8*A*b^3 - 3*a^3*B + 2*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*b*(8*a^2*A*b - 4*A*b^3 - 5*a^3*B + a*b^2*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2)), x, 9, (-2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4*A + 16*a^2*A*b^2 - 16*A*b^4 - 9*a^3*b*B + 8*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^4*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) + (2*b*(10*a^2*A*b - 6*A*b^3 - 7*a^3*B + 3*a*b^2*B)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(5/2)), x, 10, (2*(9*a^6*A + 55*a^4*A*b^2 - 212*a^2*A*b^4 + 128*A*b^6 - 40*a^5*b*B + 140*a^3*b^3*B - 80*a*b^5*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^5*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(17*a^4*A*b + 116*a^2*A*b^3 - 128*A*b^5 - 5*a^5*B - 80*a^3*b^2*B + 80*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^5*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)) + (2*b*(12*a^2*A*b - 8*A*b^3 - 9*a^3*B + 5*a*b^2*B)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^4*A - 71*a^2*A*b^2 + 48*A*b^4 + 50*a^3*b*B - 30*a*b^3*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)^2*d*Sec[c + d*x]^(3/2)) - (2*(14*a^4*A*b - 98*a^2*A*b^3 + 64*A*b^5 - 5*a^5*B + 65*a^3*b^2*B - 40*a*b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^4*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (A+B Sec[c+d x]) (a+b Sec[c+d x])^(n/3)*)
(**)


{(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^(2/3), x, 0, Int[(a + b*Sec[c + d*x])^(2/3)*(A + B*Sec[c + d*x]), x]}
{(A + B*Sec[c + d*x])*(a + b*Sec[c + d*x])^(1/3), x, 0, Int[(a + b*Sec[c + d*x])^(1/3)*(A + B*Sec[c + d*x]), x]}
{(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(1/3), x, 0, Int[(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(1/3), x]}
{(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(2/3), x, 0, Int[(A + B*Sec[c + d*x])/(a + b*Sec[c + d*x])^(2/3), x]}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+B Sec[c+d x]) (a+b Sec[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x]), x, 7, (2*(7*a*A + 9*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (10*(A*b + a*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (10*(A*b + a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(7*a*A + 9*b*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(A*b + a*B)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*d) + (2*a*A*Cos[c + d*x]^(7/2)*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x]), x, 6, (6*(A*b + a*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(5*a*A + 7*b*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(5*a*A + 7*b*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(A*b + a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d) + (2*a*A*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x]), x, 5, (2*(3*a*A + 5*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(A*b + a*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d) + (2*a*A*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x]), x, 4, (2*(A*b + a*B)*EllipticE[(c + d*x)/2, 2])/d + (2*(a*A + 3*b*B)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*a*A*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x]), x, 4, (2*(a*A - b*B)*EllipticE[(c + d*x)/2, 2])/d + (2*(A*b + a*B)*EllipticF[(c + d*x)/2, 2])/d + (2*b*B*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(1/2), x, 5, (-2*(A*b + a*B)*EllipticE[(c + d*x)/2, 2])/d + (2*(3*a*A + b*B)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*b*B*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(A*b + a*B)*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(3/2), x, 6, (-2*(5*a*A + 3*b*B)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(A*b + a*B)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*b*B*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(A*b + a*B)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2)) + (2*(5*a*A + 3*b*B)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(5/2), x, 7, (-6*(A*b + a*B)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(7*a*A + 5*b*B)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*b*B*Sin[c + d*x])/(7*d*Cos[c + d*x]^(7/2)) + (2*(A*b + a*B)*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2)) + (2*(7*a*A + 5*b*B)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (6*(A*b + a*B)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x]), x, 7, (2*(7*a^2*A + 9*A*b^2 + 18*a*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(7*a^2*A + 9*A*b^2 + 18*a*b*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*a*(11*A*b + 9*a*B)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(63*d) + (2*a*A*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x]), x, 6, (2*(6*a*A*b + 3*a^2*B + 5*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*a*(9*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(35*d) + (2*a*A*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x]), x, 5, (2*(3*a^2*A + 5*A*b^2 + 10*a*b*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(2*a*A*b + a^2*B + 3*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*a*(7*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*a*A*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x]), x, 5, (2*(2*a*A*b + a^2*B - b^2*B)*EllipticE[(c + d*x)/2, 2])/d + (2*(a^2*A + 3*A*b^2 + 6*a*b*B)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*b*(a*A - 3*b*B)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*a*A*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x]), x, 5, (2*(a^2*A - A*b^2 - 2*a*b*B)*EllipticE[(c + d*x)/2, 2])/d + (2*(6*a*A*b + 3*a^2*B + b^2*B)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*b*(3*A*b + 5*a*B)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*b*B*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(1/2), x, 6, (-2*(10*a*A*b + 5*a^2*B + 3*b^2*B)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(3*a^2*A + A*b^2 + 2*a*b*B)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*b*(5*A*b + 7*a*B)*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*(10*a*A*b + 5*a^2*B + 3*b^2*B)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*b*B*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d*Cos[c + d*x]^(3/2))}
{((a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(3/2), x, 7, (-2*(5*a^2*A + 3*A*b^2 + 6*a*b*B)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*b*(7*A*b + 9*a*B)*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*(5*a^2*A + 3*A*b^2 + 6*a*b*B)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*b*B*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d*Cos[c + d*x]^(5/2))}


{Cos[c + d*x]^(11/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]), x, 8, (2*(21*a^2*A*b + 9*A*b^3 + 7*a^3*B + 27*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(21*a^2*A*b + 9*A*b^3 + 7*a^3*B + 27*a*b^2*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*a*(81*a^2*A + 129*A*b^2 + 220*a*b*B)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(693*d) + (2*a*(15*A*b + 11*a*B)*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(99*d) + (2*a*A*Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]), x, 7, (2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*a*(49*a^2*A + 89*A*b^2 + 144*a*b*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*a*(13*A*b + 9*a*B)*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(63*d) + (2*a*A*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]), x, 6, (2*(9*a^2*A*b + 5*A*b^3 + 3*a^3*B + 15*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(5*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 21*b^3*B)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*a*(25*a^2*A + 57*A*b^2 + 84*a*b*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*a*(11*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(35*d) + (2*a*A*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]), x, 6, (2*(3*a^3*A + 15*a*A*b^2 + 15*a^2*b*B - 5*b^3*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(3*a^2*A*b + 3*A*b^3 + a^3*B + 9*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(12*a*A*b + 5*a^2*B - 15*b^2*B)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*a*(9*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d) + (2*a*A*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]), x, 6, (2*(3*a^2*A*b - A*b^3 + a^3*B - 3*a*b^2*B)*EllipticE[(c + d*x)/2, 2])/d + (2*(a^3*A + 9*a*A*b^2 + 9*a^2*b*B + b^3*B)*EllipticF[(c + d*x)/2, 2])/(3*d) - (2*b*(a^2*A - 3*A*b^2 - 8*a*b*B)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) - (2*b*(a*A - b*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*a*A*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]), x, 6, (2*(5*a^3*A - 15*a*A*b^2 - 15*a^2*b*B - 3*b^3*B)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(9*a^2*A*b + A*b^3 + 3*a^3*B + 3*a*b^2*B)*EllipticF[(c + d*x)/2, 2])/(3*d) + (2*b*(40*a*A*b + 33*a^2*B + 9*b^2*B)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*b*(5*A*b + 9*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*b*B*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(1/2), x, 7, (-2*(15*a^2*A*b + 3*A*b^3 + 5*a^3*B + 9*a*b^2*B)*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*(21*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 5*b^3*B)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*b*(84*a*A*b + 57*a^2*B + 25*b^2*B)*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (2*(15*a^2*A*b + 3*A*b^3 + 5*a^3*B + 9*a*b^2*B)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*b*(7*A*b + 11*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(35*d*Cos[c + d*x]^(3/2)) + (2*b*B*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(7*d*Cos[c + d*x]^(3/2))}
{((a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(3/2), x, 8, (-2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B)*EllipticE[(c + d*x)/2, 2])/(15*d) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*EllipticF[(c + d*x)/2, 2])/(21*d) + (2*b*(144*a*A*b + 89*a^2*B + 49*b^2*B)*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*(21*a^2*A*b + 5*A*b^3 + 7*a^3*B + 15*a*b^2*B)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*b*(9*A*b + 13*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(63*d*Cos[c + d*x]^(5/2)) + (2*b*B*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(9*d*Cos[c + d*x]^(5/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x]), x, 8, (2*(3*a^2*A + 5*A*b^2 - 5*a*b*B)*EllipticE[(c + d*x)/2, 2])/(5*a^3*d) - (2*(a^2*A*b + 3*A*b^3 - a^3*B - 3*a*b^2*B)*EllipticF[(c + d*x)/2, 2])/(3*a^4*d) + (2*b^3*(A*b - a*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^4*(a + b)*d) - (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*d) + (2*A*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*a*d)}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x]), x, 7, (-2*(A*b - a*B)*EllipticE[(c + d*x)/2, 2])/(a^2*d) + (2*(a^2*A + 3*A*b^2 - 3*a*b*B)*EllipticF[(c + d*x)/2, 2])/(3*a^3*d) - (2*b^2*(A*b - a*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^3*(a + b)*d) + (2*A*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*d)}
{(Cos[c + d*x]^(1/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x]), x, 6, (2*A*EllipticE[(c + d*x)/2, 2])/(a*d) - (2*(A*b - a*B)*EllipticF[(c + d*x)/2, 2])/(a^2*d) + (2*b*(A*b - a*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^2*(a + b)*d)}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])), x, 4, (2*A*EllipticF[(1/2)*(c + d*x), 2])/(a*d) + (2*((-A)*b + a*B)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a*(a + b)*d)}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])), x, 6, (-2*B*EllipticE[(c + d*x)/2, 2])/(b*d) + (2*(A*b - a*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(b*(a + b)*d) + (2*B*Sin[c + d*x])/(b*d*Sqrt[Cos[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])), x, 8, (-2*(A*b - a*B)*EllipticE[(c + d*x)/2, 2])/(b^2*d) + (2*B*EllipticF[(c + d*x)/2, 2])/(3*b*d) - (2*a*(A*b - a*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(b^2*(a + b)*d) + (2*B*Sin[c + d*x])/(3*b*d*Cos[c + d*x]^(3/2)) + (2*(A*b - a*B)*Sin[c + d*x])/(b^2*d*Sqrt[Cos[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])), x, 9, (2*(5*a*A*b - 5*a^2*B - 3*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(5*b^3*d) + (2*(A*b - a*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^2*d) + (2*a^2*(A*b - a*B)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(b^3*(a + b)*d) + (2*B*Sin[c + d*x])/(5*b*d*Cos[c + d*x]^(5/2)) + (2*(A*b - a*B)*Sin[c + d*x])/(3*b^2*d*Cos[c + d*x]^(3/2)) - (2*(5*a*A*b - 5*a^2*B - 3*b^2*B)*Sin[c + d*x])/(5*b^3*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^2, x, 9, ((6*a^4*A + 24*a^2*A*b^2 - 35*A*b^4 - 20*a^3*b*B + 25*a*b^3*B)*EllipticE[(c + d*x)/2, 2])/(5*a^4*(a^2 - b^2)*d) - ((4*a^4*A*b + 20*a^2*A*b^3 - 21*A*b^5 - 2*a^5*B - 16*a^3*b^2*B + 15*a*b^4*B)*EllipticF[(c + d*x)/2, 2])/(3*a^5*(a^2 - b^2)*d) + (b^3*(9*a^2*A*b - 7*A*b^3 - 7*a^3*B + 5*a*b^2*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^5*(a - b)*(a + b)^2*d) - ((4*a^2*A*b - 7*A*b^3 - 2*a^3*B + 5*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)*d) + ((2*a^2*A - 7*A*b^2 + 5*a*b*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^2, x, 8, -(((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B)*EllipticE[(c + d*x)/2, 2])/(a^3*(a^2 - b^2)*d)) + ((2*a^4*A + 16*a^2*A*b^2 - 15*A*b^4 - 12*a^3*b*B + 9*a*b^3*B)*EllipticF[(c + d*x)/2, 2])/(3*a^4*(a^2 - b^2)*d) - (b^2*(7*a^2*A*b - 5*A*b^3 - 5*a^3*B + 3*a*b^2*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^4*(a - b)*(a + b)^2*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + (b*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{(Cos[c + d*x]^(1/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^2, x, 7, ((2*a^2*A - 3*A*b^2 + a*b*B)*EllipticE[(c + d*x)/2, 2])/(a^2*(a^2 - b^2)*d) - ((4*a^2*A*b - 3*A*b^3 - 2*a^3*B + a*b^2*B)*EllipticF[(c + d*x)/2, 2])/(a^3*(a^2 - b^2)*d) + (b*(5*a^2*A*b - 3*A*b^3 - 3*a^3*B + a*b^2*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^3*(a - b)*(a + b)^2*d) + (b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^2), x, 7, ((A*b - a*B)*EllipticE[(c + d*x)/2, 2])/(a*(a^2 - b^2)*d) + ((2*a^2*A - A*b^2 - a*b*B)*EllipticF[(c + d*x)/2, 2])/(a^2*(a^2 - b^2)*d) - ((3*a^2*A*b - A*b^3 - a^3*B - a*b^2*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^2*(a - b)*(a + b)^2*d) - ((A*b - a*B)*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2), x, 7, -(((A*b - a*B)*EllipticE[(c + d*x)/2, 2])/(b*(a^2 - b^2)*d)) - ((A*b - a*B)*EllipticF[(c + d*x)/2, 2])/(a*(a^2 - b^2)*d) + ((a^2*A*b + A*b^3 + a^3*B - 3*a*b^2*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a*(a - b)*b*(a + b)^2*d) + (a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2), x, 8, ((a*A*b - 3*a^2*B + 2*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(b^2*(a^2 - b^2)*d) + ((A*b - a*B)*EllipticF[(1/2)*(c + d*x), 2])/(b*(a^2 - b^2)*d) + ((a^2*A*b - 3*A*b^3 - 3*a^3*B + 5*a*b^2*B)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^2*(a + b)^2*d) - ((a*A*b - 3*a^2*B + 2*b^2*B)*Sin[c + d*x])/(b^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + (a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2), x, 9, -(((3*a^2*A*b - 2*A*b^3 - 5*a^3*B + 4*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(b^3*(a^2 - b^2)*d)) - ((3*a*A*b - 5*a^2*B + 2*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^2*(a^2 - b^2)*d) - (a*(3*a^2*A*b - 5*A*b^3 - 5*a^3*B + 7*a*b^2*B)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^3*(a + b)^2*d) - ((3*a*A*b - 5*a^2*B + 2*b^2*B)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) + ((3*a^2*A*b - 2*A*b^3 - 5*a^3*B + 4*a*b^2*B)*Sin[c + d*x])/(b^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) + (a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x]))}


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^3, x, 10, ((24*a^6*A + 192*a^4*A*b^2 - 561*a^2*A*b^4 + 315*A*b^6 - 120*a^5*b*B + 325*a^3*b^3*B - 175*a*b^5*B)*EllipticE[(c + d*x)/2, 2])/(20*a^5*(a^2 - b^2)^2*d) - ((24*a^6*A*b + 192*a^4*A*b^3 - 387*a^2*A*b^5 + 189*A*b^7 - 8*a^7*B - 128*a^5*b^2*B + 223*a^3*b^4*B - 105*a*b^6*B)*EllipticF[(c + d*x)/2, 2])/(12*a^6*(a^2 - b^2)^2*d) + (b^3*(99*a^4*A*b - 150*a^2*A*b^3 + 63*A*b^5 - 63*a^5*B + 86*a^3*b^2*B - 35*a*b^4*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(4*a^6*(a - b)^2*(a + b)^3*d) - ((24*a^4*A*b - 105*a^2*A*b^3 + 63*A*b^5 - 8*a^5*B + 61*a^3*b^2*B - 35*a*b^4*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 101*a^2*A*b^2 + 63*A*b^4 + 65*a^3*b*B - 35*a*b^3*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(20*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b*(15*a^2*A*b - 9*A*b^3 - 11*a^3*B + 5*a*b^2*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^3, x, 9, -((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B)*EllipticE[(c + d*x)/2, 2])/(4*a^4*(a^2 - b^2)^2*d) + ((8*a^6*A + 128*a^4*A*b^2 - 223*a^2*A*b^4 + 105*A*b^6 - 72*a^5*b*B + 99*a^3*b^3*B - 45*a*b^5*B)*EllipticF[(c + d*x)/2, 2])/(12*a^5*(a^2 - b^2)^2*d) - (b^2*(63*a^4*A*b - 86*a^2*A*b^3 + 35*A*b^5 - 35*a^5*B + 38*a^3*b^2*B - 15*a*b^4*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(4*a^5*(a - b)^2*(a + b)^3*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d) + (b*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b*(13*a^2*A*b - 7*A*b^3 - 9*a^3*B + 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{(Cos[c + d*x]^(1/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^3, x, 8, ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B)*EllipticE[(c + d*x)/2, 2])/(4*a^3*(a^2 - b^2)^2*d) - ((24*a^4*A*b - 33*a^2*A*b^3 + 15*A*b^5 - 8*a^5*B + 5*a^3*b^2*B - 3*a*b^4*B)*EllipticF[(c + d*x)/2, 2])/(4*a^4*(a^2 - b^2)^2*d) + (b*(35*a^4*A*b - 38*a^2*A*b^3 + 15*A*b^5 - 15*a^5*B + 6*a^3*b^2*B - 3*a*b^4*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(4*a^4*(a - b)^2*(a + b)^3*d) + (b*(A*b - a*B)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2) + (b*(11*a^2*A*b - 5*A*b^3 - 7*a^3*B + a*b^2*B)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^3), x, 8, ((9*a^2*A*b - 3*A*b^3 - 5*a^3*B - a*b^2*B)*EllipticE[(c + d*x)/2, 2])/(4*a^2*(a^2 - b^2)^2*d) + ((8*a^4*A - 5*a^2*A*b^2 + 3*A*b^4 - 7*a^3*b*B + a*b^3*B)*EllipticF[(c + d*x)/2, 2])/(4*a^3*(a^2 - b^2)^2*d) - ((15*a^4*A*b - 6*a^2*A*b^3 + 3*A*b^5 - 3*a^5*B - 10*a^3*b^2*B + a*b^4*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(4*a^3*(a - b)^2*(a + b)^3*d) - ((A*b - a*B)*Sin[c + d*x])/(2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2) - ((7*a^2*A*b - A*b^3 - 3*a^3*B - 3*a*b^2*B)*Sin[c + d*x])/(4*a*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3), x, 8, -((5*a^2*A*b + A*b^3 - a^3*B - 5*a*b^2*B)*EllipticE[(c + d*x)/2, 2])/(4*a*b*(a^2 - b^2)^2*d) - ((7*a^2*A*b - A*b^3 - 3*a^3*B - 3*a*b^2*B)*EllipticF[(c + d*x)/2, 2])/(4*a^2*(a^2 - b^2)^2*d) + ((3*a^4*A*b + 10*a^2*A*b^3 - A*b^5 + a^5*B - 10*a^3*b^2*B - 3*a*b^4*B)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(4*a^2*(a - b)^2*b*(a + b)^3*d) + (a*(A*b - a*B)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2) + ((3*a^2*A*b + 3*A*b^3 + a^3*B - 7*a*b^2*B)*Sin[c + d*x])/(4*b*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^3), x, 8, ((a^2*A*b + 5*A*b^3 + 3*a^3*B - 9*a*b^2*B)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^2*(a^2 - b^2)^2*d) + ((3*a^2*A*b + 3*A*b^3 + a^3*B - 7*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(4*a*b*(a^2 - b^2)^2*d) + ((a^4*A*b - 10*a^2*A*b^3 - 3*A*b^5 + 3*a^5*B - 6*a^3*b^2*B + 15*a*b^4*B)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a*(a - b)^2*b^2*(a + b)^3*d) + (a*(A*b - a*B)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2) - (a*(a^2*A*b + 5*A*b^3 + 3*a^3*B - 9*a*b^2*B)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^3), x, 9, ((3*a^3*A*b - 9*a*A*b^3 - 15*a^4*B + 29*a^2*b^2*B - 8*b^4*B)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^3*(a^2 - b^2)^2*d) + ((a^2*A*b - 7*A*b^3 - 5*a^3*B + 11*a*b^2*B)*EllipticF[(1/2)*(c + d*x), 2])/(4*b^2*(a^2 - b^2)^2*d) + ((3*a^4*A*b - 6*a^2*A*b^3 + 15*A*b^5 - 15*a^5*B + 38*a^3*b^2*B - 35*a*b^4*B)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^3*(a + b)^3*d) - ((3*a^3*A*b - 9*a*A*b^3 - 15*a^4*B + 29*a^2*b^2*B - 8*b^4*B)*Sin[c + d*x])/(4*b^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + (a*(A*b - a*B)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2) + (a*(a^2*A*b - 7*A*b^3 - 5*a^3*B + 11*a*b^2*B)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^3), x, 10, -(((15*a^4*A*b - 29*a^2*A*b^3 + 8*A*b^5 - 35*a^5*B + 65*a^3*b^2*B - 24*a*b^4*B)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^4*(a^2 - b^2)^2*d)) - ((15*a^3*A*b - 33*a*A*b^3 - 35*a^4*B + 61*a^2*b^2*B - 8*b^4*B)*EllipticF[(1/2)*(c + d*x), 2])/(12*b^3*(a^2 - b^2)^2*d) - (a*(15*a^4*A*b - 38*a^2*A*b^3 + 35*A*b^5 - 35*a^5*B + 86*a^3*b^2*B - 63*a*b^4*B)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^4*(a + b)^3*d) - ((15*a^3*A*b - 33*a*A*b^3 - 35*a^4*B + 61*a^2*b^2*B - 8*b^4*B)*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) + ((15*a^4*A*b - 29*a^2*A*b^3 + 8*A*b^5 - 35*a^5*B + 65*a^3*b^2*B - 24*a*b^4*B)*Sin[c + d*x])/(4*b^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) + (a*(A*b - a*B)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2) + (a*(3*a^2*A*b - 9*A*b^3 - 7*a^3*B + 13*a*b^2*B)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+B Sec[c+d x]) (a+b Sec[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(7/2)*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 9, (2*(a + b)*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 17*a^2*A*b^2 - 8*A*b^4 - 14*a^3*b*B + 14*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^2*A - 4*A*b^2 + 7*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a^2*d) + (2*(A*b + 7*a*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*a*d) + (2*A*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 8, (2*(a + b)*(9*a^2*A - 2*A*b^2 + 5*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^2*A*b - 2*A*b^3 - 5*a^3*B + 5*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a*d) + (2*A*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 7, (2*(a + b)*(A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*A*(a^2 - b^2)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]), x, 9, (2*A*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(1/2), x, 10, -(((a + b)*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + ((2*a*A + b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b + a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (B*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(3/2), x, 11, -((a + b)*(4*A*b + a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(4*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a*A*b - a^2*B + 4*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(4*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (B*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d*Cos[c + d*x]^(3/2)) + ((4*A*b + a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 10, (2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(39*a^4*A*b - 31*a^2*A*b^3 - 8*A*b^5 + 75*a^5*B - 93*a^3*b^2*B + 18*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a^2*d) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d) + (2*(10*A*b + 9*a*B)*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(63*d) + (2*a*A*Cos[c + d*x]^(7/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 9, (2*(a + b)*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 31*a^2*A*b^2 + 6*A*b^4 + 21*a^3*b*B - 21*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^2*A + 3*A*b^2 + 42*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a*d) + (2*(8*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*d) + (2*a*A*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 8, (2*(a + b)*(9*a^2*A + 3*A*b^2 + 20*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2*A*b - 3*A*b^3 + 5*a^3*B - 5*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(6*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*a*A*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 10, (2*(a + b)*(4*A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - A*b^2 + 3*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*A*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]), x, 10, ((a + b)*(2*a*A - b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*a*A*b + 2*a^2*B + b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(2*A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*B*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(1/2), x, 11, -((a + b)*(4*A*b + 5*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((8*a^2*A + 4*A*b^2 + 7*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((12*a*A*b + 3*a^2*B + 4*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*B*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d*Cos[c + d*x]^(3/2)) + ((4*A*b + 5*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(3/2), x, 12, -((a + b)*(30*a*A*b + 3*a^2*B + 16*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(24*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((42*a*A*b + 17*a^2*B + 16*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((6*a^2*A*b + 8*A*b^3 - a^3*B + 12*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(8*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*B*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(5/2)) + ((6*A*b + 7*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*d*Cos[c + d*x]^(3/2)) + ((30*a*A*b + 3*a^2*B + 16*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*b*d*Sqrt[Cos[c + d*x]])}


{Cos[c + d*x]^(11/2)*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 11, (2*(a + b)*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3465*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(675*a^6*A - 390*a^4*A*b^2 - 245*a^2*A*b^4 - 40*A*b^6 + 1254*a^5*b*B - 1364*a^3*b^3*B + 110*a*b^5*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3465*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(675*a^4*A + 1025*a^2*A*b^2 - 20*A*b^4 + 1793*a^3*b*B + 55*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3465*a^2*d) + (2*(1145*a^2*A*b + 15*A*b^3 + 539*a^3*B + 825*a*b^2*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3465*a*d) + (2*(81*a^2*A + 113*A*b^2 + 209*a*b*B)*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(693*d) + (2*a*(14*A*b + 11*a*B)*Cos[c + d*x]^(7/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(99*d) + (2*a*A*Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 10, (2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(114*a^4*A*b - 124*a^2*A*b^3 + 10*A*b^5 + 75*a^5*B - 30*a^3*b^2*B - 45*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d) + (2*(49*a^2*A + 75*A*b^2 + 135*a*b*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*d) + (2*a*(4*A*b + 3*a*B)*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(21*d) + (2*a*A*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 9, (2*(a + b)*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 10*a^2*A*b^2 - 15*A*b^4 + 56*a^3*b*B - 56*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^2*A + 45*A*b^2 + 77*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*d) + (2*a*(10*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*d) + (2*a*A*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 11, (2*(a + b)*(9*a^2*A + 23*A*b^2 + 35*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(8*a^2*A*b - 8*A*b^3 + 5*a^3*B + 10*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^3*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(8*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*a*A*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 11, ((a + b)*(14*a*A*b + 6*a^2*B - 3*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*a^3*A + 4*a*A*b^2 + 12*a^2*b*B + 3*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b^2*(2*A*b + 5*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (b*(2*a*A - 3*b*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*a*A*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]), x, 11, ((a + b)*(8*a^2*A - 4*A*b^2 - 9*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((16*a^2*A*b + 4*A*b^3 + 8*a^3*B + 11*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(20*a*A*b + 15*a^2*B + 4*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(4*A*b + 7*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Cos[c + d*x]]) + (b*B*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(2*d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(1/2), x, 12, -((a + b)*(54*a*A*b + 33*a^2*B + 16*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^3*A + 66*a*A*b^2 + 59*a^2*b*B + 16*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((30*a^2*A*b + 8*A*b^3 + 5*a^3*B + 20*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(8*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(2*A*b + 3*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d*Cos[c + d*x]^(3/2)) + ((54*a*A*b + 33*a^2*B + 16*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d*Sqrt[Cos[c + d*x]]) + (b*B*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x]))/Cos[c + d*x]^(3/2), x, 13, -((a + b)*(264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(192*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((472*a^2*A*b + 128*A*b^3 + 133*a^3*B + 356*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(192*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((40*a^3*A*b + 160*a*A*b^3 - 5*a^4*B + 120*a^2*b^2*B + 48*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(64*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(8*A*b + 11*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d*Cos[c + d*x]^(5/2)) + ((104*a*A*b + 59*a^2*B + 36*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(96*d*Cos[c + d*x]^(3/2)) + ((264*a^2*A*b + 128*A*b^3 + 15*a^3*B + 284*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(192*b*d*Sqrt[Cos[c + d*x]]) + (b*B*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(4*d*Cos[c + d*x]^(5/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x]))/Sqrt[a + b*Sec[c + d*x]], x, 8, (2*(a + b)*(9*a^2*A + 8*A*b^2 - 10*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(15*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(7*a^2*A*b + 8*A*b^3 - 5*a^3*B - 10*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(15*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(4*A*b - 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^2*d) + (2*A*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a*d)}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x]))/Sqrt[a + b*Sec[c + d*x]], x, 7, (-2*(a + b)*(2*A*b - 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A + 2*A*b^2 - 3*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a*d)}
{(Cos[c + d*x]^(1/2)*(A + B*Sec[c + d*x]))/Sqrt[a + b*Sec[c + d*x]], x, 6, (2*A*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(1/2)*Sqrt[a + b*Sec[c + d*x]]), x, 6, (2*A*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]), x, 10, -(((a + b)*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (B*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b*d*Sqrt[Cos[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]), x, 11, -((a + b)*(4*A*b - 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(4*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(4*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((4*a*A*b - 3*a^2*B - 4*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(4*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (B*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*b*d*Cos[c + d*x]^(3/2)) + ((4*A*b - 3*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b^2*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(3/2), x, 9, (2*(9*a^4*A + 24*a^2*A*b^2 - 48*A*b^4 - 25*a^3*b*B + 40*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(15*a^4*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(12*a^2*A*b + 48*A*b^3 - 5*a^3*B - 40*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(15*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(9*a^2*A*b - 24*A*b^3 - 5*a^3*B + 20*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)*d) + (2*(a^2*A - 6*A*b^2 + 5*a*b*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d)}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(3/2), x, 8, (-2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a^3*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A + 8*A*b^2 - 6*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - 4*A*b^2 + 3*a*b*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d)}
{(Cos[c + d*x]^(1/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*(a^2*A - 2*A*b^2 + a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(3/2)), x, 7, (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(a*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Sin[c + d*x])/((a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)), x, 8, (-2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/((a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)), x, 11, ((2*a*A*b - 3*a^2*B + b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/((a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b - 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) - ((2*a*A*b - 3*a^2*B + b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(3/2)), x, 12, -(((12*a^2*A*b - 4*A*b^3 - 15*a^3*B + 7*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(4*(a - b)*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + ((4*A*b - 5*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(4*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((12*a*A*b - 15*a^2*B - 4*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(4*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]) - ((4*a*A*b - 5*a^2*B + b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*b^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) + ((12*a^2*A*b - 4*A*b^3 - 15*a^3*B + 7*a*b^2*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(5/2), x, 10, (2*(9*a^6*A + 55*a^4*A*b^2 - 212*a^2*A*b^4 + 128*A*b^6 - 40*a^5*b*B + 140*a^3*b^3*B - 80*a*b^5*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(15*a^5*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(17*a^4*A*b + 116*a^2*A*b^3 - 128*A*b^5 - 5*a^5*B - 80*a^3*b^2*B + 80*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(15*a^5*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*b*(12*a^2*A*b - 8*A*b^3 - 9*a^3*B + 5*a*b^2*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(14*a^4*A*b - 98*a^2*A*b^3 + 64*A*b^5 - 5*a^5*B + 65*a^3*b^2*B - 40*a*b^4*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^4*(a^2 - b^2)^2*d) + (2*(3*a^4*A - 71*a^2*A*b^2 + 48*A*b^4 + 50*a^3*b*B - 30*a*b^3*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)^2*d)}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(5/2), x, 9, (-2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4*A + 16*a^2*A*b^2 - 16*A*b^4 - 9*a^3*b*B + 8*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a^4*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*b*(10*a^2*A*b - 6*A*b^3 - 7*a^3*B + 3*a*b^2*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d)}
{(Cos[c + d*x]^(1/2)*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(9*a^2*A*b - 8*A*b^3 - 3*a^3*B + 2*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(A*b - a*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) + (2*b*(8*a^2*A*b - 4*A*b^3 - 5*a^3*B + a*b^2*B)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(5/2)), x, 8, (2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2*A - 2*A*b^2 - a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Sin[c + d*x])/(3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) - (2*(5*a^2*A*b - A*b^3 - 2*a^3*B - 2*a*b^2*B)*Sin[c + d*x])/(3*a*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2)), x, 8, (-2*(3*a^2*A + A*b^2 - 4*a*b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) + (2*(2*a^2*A*b + 2*A*b^3 + a^3*B - 5*a*b^2*B)*Sin[c + d*x])/(3*b*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(5/2)), x, 11, (2*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)) - (2*a*(4*A*b^3 + 3*a^3*B - 7*a*b^2*B)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x])/(Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(5/2)), x, 12, ((6*a^3*A*b - 14*a*A*b^3 - 15*a^4*B + 26*a^2*b^2*B - 3*b^4*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a*A*b - 5*a^2*B + 3*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*b^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b - 5*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(A*b - a*B)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)) + (2*a*(2*a^2*A*b - 6*A*b^3 - 5*a^3*B + 9*a*b^2*B)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) - ((6*a^3*A*b - 14*a*A*b^3 - 15*a^4*B + 26*a^2*b^2*B - 3*b^4*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}


(* ::Section:: *)
(*Sec[c+d x]^m (A+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (A+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 6, (a*(4*A + 3*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*b*(5*A + 4*C)*Tan[c + d*x])/(15*d) + (a*(4*A + 3*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (b*(5*A + 4*C)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + (a*C*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (C*Sec[c + d*x]^3*(a + b*Sec[c + d*x])*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 5, (b*(4*A + 3*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (a*(3*A + 2*C)*Tan[c + d*x])/(3*d) + (b*(4*A + 3*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + (a*C*Sec[c + d*x]^2*Tan[c + d*x])/(12*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, (a*(2*A + C)*ArcTanh[Sin[c + d*x]])/(2*d) + (b*(3*A + 2*C)*Tan[c + d*x])/(3*d) + (a*C*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, a*A*x + (b*(2*A + C)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*C*Tan[c + d*x])/(2*d) + (C*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, A*b*x + (a*C*ArcTanh[Sin[c + d*x]])/d + (A*(a + b*Sec[c + d*x])*Sin[c + d*x])/d - (b*(A - C)*Tan[c + d*x])/d}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, (1/2)*a*(A + 2*C)*x + (b*C*ArcTanh[Sin[c + d*x]])/d + (A*b*Sin[c + d*x])/(2*d) + (A*(b + a*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, (1/2)*b*(A + 2*C)*x + (a*(2*A + 3*C)*Sin[c + d*x])/(3*d) + (A*b*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 5, (1/8)*a*(3*A + 4*C)*x + (b*(2*A + 3*C)*Sin[c + d*x])/(3*d) + (a*(3*A + 4*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (A*b*Cos[c + d*x]^2*Sin[c + d*x])/(12*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 6, (1/8)*b*(3*A + 4*C)*x + (2*a*(4*A + 5*C)*Sin[c + d*x])/(15*d) + (b*(3*A + 4*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*(4*A + 5*C)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (A*b*Cos[c + d*x]^3*Sin[c + d*x])/(20*d) + (A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}


{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 6, (a*b*(4*A + 3*C)*ArcTanh[Sin[c + d*x]])/(4*d) + ((15*a^2*A + 10*A*b^2 + 10*a^2*C + 8*b^2*C)*Tan[c + d*x])/(15*d) + (a*b*(4*A + 3*C)*Sec[c + d*x]*Tan[c + d*x])/(4*d) + ((10*A*b^2 + a^2*C + 8*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(30*d) + (a*C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(10*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, ((8*a^2*A + 4*A*b^2 + 4*a^2*C + 3*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*a*b*(3*A + 2*C)*Tan[c + d*x])/(3*d) + ((12*A*b^2 + 2*a^2*C + 9*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + (a*C*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, a^2*A*x + (a*b*(2*A + C)*ArcTanh[Sin[c + d*x]])/d + ((3*A*b^2 + a^2*C + 2*b^2*C)*Tan[c + d*x])/(3*d) + (a*C*(a + b*Sec[c + d*x])*Tan[c + d*x])/(3*d) + (C*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, 2*a*A*b*x + ((2*A*b^2 + 2*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/d - (a*b*(2*A - 3*C)*Tan[c + d*x])/(2*d) - (b*(2*A - C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, (1/2)*a^2*A*x + A*b^2*x + a^2*C*x + (2*a*b*C*ArcTanh[Sin[c + d*x]])/d + (A*b*(a + b*Sec[c + d*x])*Sin[c + d*x])/d + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) - (b^2*(3*A - 2*C)*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, (a*A*b + 2*a*b*C)*x + (b^2*C*ArcTanh[Sin[c + d*x]])/d + ((2*a^2*A + A*b^2 + 3*a^2*C)*Sin[c + d*x])/(3*d) + (A*b*(b + a*Cos[c + d*x])*Sin[c + d*x])/(3*d) + (A*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, (1/8)*(3*a^2*A + 4*A*b^2 + 4*a^2*C + 8*b^2*C)*x + (2*a*b*(2*A + 3*C)*Sin[c + d*x])/(3*d) + ((9*a^2*A + 2*A*b^2 + 12*a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + (A*b*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(6*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 6, (1/4)*a*b*(3*A + 4*C)*x + ((8*a^2*A + 10*A*b^2 + 10*a^2*C + 15*b^2*C)*Sin[c + d*x])/(15*d) + (a*b*(3*A + 4*C)*Cos[c + d*x]*Sin[c + d*x])/(4*d) + ((8*a^2*A + A*b^2 + 10*a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(30*d) + (A*b*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(10*d) + (A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d)}


{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 7, (b*(24*a^2*A + 6*A*b^2 + 18*a^2*C + 5*b^2*C)*ArcTanh[Sin[c + d*x]])/(16*d) + (a*(15*a^2*A + 30*A*b^2 + 10*a^2*C + 24*b^2*C)*Tan[c + d*x])/(15*d) + (b*(24*a^2*A + 6*A*b^2 + 18*a^2*C + 5*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + (a*(90*A*b^2 + 2*a^2*C + 71*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(120*d) + ((30*A*b^2 + 6*a^2*C + 25*b^2*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(120*d) + (a*C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(10*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(6*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (a*(8*a^2*A + 12*A*b^2 + 4*a^2*C + 9*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (b*(45*a^2*A + 10*A*b^2 + 30*a^2*C + 8*b^2*C)*Tan[c + d*x])/(15*d) + (a*(140*A*b^2 + 6*a^2*C + 103*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(120*d) + ((10*A*b^2 + 3*a^2*C + 8*b^2*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(30*d) + (3*a*C*Sec[c + d*x]*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(20*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, a^3*A*x + (b*(24*a^2*A + 4*A*b^2 + 12*a^2*C + 3*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (a*(20*A*b^2 + 2*a^2*C + 13*b^2*C)*Tan[c + d*x])/(8*d) + ((4*A*b^2 + 2*a^2*C + 3*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(8*d) + (a*C*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(4*d) + (C*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, 3*a^2*A*b*x + (a*(6*A*b^2 + 2*a^2*C + 3*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (A*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/d - (b*(6*a^2*A - 6*A*b^2 - 11*a^2*C - 4*b^2*C)*Tan[c + d*x])/(6*d) - (a*b*(6*A - 5*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) - (b*(3*A - C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/2)*a*(a^2*A + 6*A*b^2 + 2*a^2*C)*x + (b*(2*A*b^2 + 6*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (3*A*b*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(2*d) - (5*a*b^2*(A - C)*Tan[c + d*x])/(2*d) - (b^2*(4*A - C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/2)*b*(3*a^2*A + 2*A*b^2 + 6*a^2*C)*x + (3*a*b^2*C*ArcTanh[Sin[c + d*x]])/d + ((2*a^2*A + 3*A*b^2 + 3*a^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d) + (A*b*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d) - (b*(4*a^2*A + 11*A*b^2 + 6*a^2*C - 6*b^2*C)*Tan[c + d*x])/(6*d)}
{Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/8)*a*(3*a^2*A + 12*A*b^2 + 4*a^2*C + 24*b^2*C)*x + (b^3*C*ArcTanh[Sin[c + d*x]])/d + (b*(13*a^2*A + 2*A*b^2 + 20*a^2*C)*Sin[c + d*x])/(8*d) + ((3*a^2*A + 2*A*b^2 + 4*a^2*C)*(b + a*Cos[c + d*x])*Sin[c + d*x])/(8*d) + (A*b*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(4*d) + (A*(b + a*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/8)*b*(9*a^2*A + 4*A*b^2 + 12*a^2*C + 8*b^2*C)*x + (a*(8*a^2*A + 30*A*b^2 + 10*a^2*C + 45*b^2*C)*Sin[c + d*x])/(15*d) + (b*(103*a^2*A + 6*A*b^2 + 140*a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + ((8*a^2*A + 3*A*b^2 + 10*a^2*C)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(30*d) + (3*A*b*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(20*d) + (A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^6*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 7, (1/16)*a*(5*a^2*A + 18*A*b^2 + 6*a^2*C + 24*b^2*C)*x + (b*(24*a^2*A + 10*A*b^2 + 30*a^2*C + 15*b^2*C)*Sin[c + d*x])/(15*d) + (a*(5*a^2*A + 18*A*b^2 + 6*a^2*C + 24*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + (b*(71*a^2*A + 2*A*b^2 + 90*a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(120*d) + ((25*a^2*A + 6*A*b^2 + 30*a^2*C)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(120*d) + (A*b*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(10*d) + (A*Cos[c + d*x]^5*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(6*d)}


{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 8, (a*b*(8*a^2*A + 6*A*b^2 + 6*a^2*C + 5*b^2*C)*ArcTanh[Sin[c + d*x]])/(4*d) + ((105*a^4*A + 420*a^2*A*b^2 + 56*A*b^4 + 70*a^4*C + 336*a^2*b^2*C + 48*b^4*C)*Tan[c + d*x])/(105*d) + (a*b*(8*a^2*A + 6*A*b^2 + 6*a^2*C + 5*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(4*d) + ((252*a^2*A*b^2 + 56*A*b^4 + 2*a^4*C + 197*a^2*b^2*C + 48*b^4*C)*Sec[c + d*x]^2*Tan[c + d*x])/(210*d) + (a*(126*A*b^2 + 6*a^2*C + 103*b^2*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(210*d) + ((7*A*b^2 + 2*a^2*C + 6*b^2*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(35*d) + (2*a*C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(21*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^4*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, ((16*a^4*A + 48*a^2*A*b^2 + 6*A*b^4 + 8*a^4*C + 36*a^2*b^2*C + 5*b^4*C)*ArcTanh[Sin[c + d*x]])/(16*d) + (4*a*b*(15*a^2*A + 10*A*b^2 + 10*a^2*C + 8*b^2*C)*Tan[c + d*x])/(15*d) + ((460*a^2*A*b^2 + 90*A*b^4 + 8*a^4*C + 334*a^2*b^2*C + 75*b^4*C)*Sec[c + d*x]*Tan[c + d*x])/(240*d) + (a*(50*A*b^2 + 4*a^2*C + 39*b^2*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(60*d) + ((30*A*b^2 + 12*a^2*C + 25*b^2*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(120*d) + (2*a*C*Sec[c + d*x]*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(15*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])^4*Tan[c + d*x])/(6*d)}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, a^4*A*x + (a*b*(8*a^2*A + 4*A*b^2 + 4*a^2*C + 3*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((130*a^2*A*b^2 + 20*A*b^4 + 6*a^4*C + 83*a^2*b^2*C + 16*b^4*C)*Tan[c + d*x])/(30*d) + (a*(40*A*b^2 + 6*a^2*C + 29*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(30*d) + ((5*A*b^2 + 3*a^2*C + 4*b^2*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(15*d) + (a*C*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(5*d) + (C*(a + b*Sec[c + d*x])^4*Tan[c + d*x])/(5*d)}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, 4*a^3*A*b*x + ((48*a^2*A*b^2 + 4*A*b^4 + 8*a^4*C + 24*a^2*b^2*C + 3*b^4*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (A*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/d - (a*b*(24*a^2*A - 84*A*b^2 - 50*a^2*C - 55*b^2*C)*Tan[c + d*x])/(24*d) - (b*(24*a^2*A - 12*A*b^2 - 26*a^2*C - 9*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(24*d) - (a*b*(12*A - 7*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) - (b*(4*A - C)*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, (1/2)*a^2*(a^2*A + 12*A*b^2 + 2*a^2*C)*x + (2*a*b*(2*A*b^2 + 2*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/d + (2*A*b*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/d + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(2*d) - (b^2*(21*a^2*A - 6*A*b^2 - 26*a^2*C - 4*b^2*C)*Tan[c + d*x])/(6*d) - (a*b^2*(9*A - 4*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(3*d) - (b^2*(15*A - 2*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(6*d)}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, 2*a*b*(a^2*A + 2*A*b^2 + 2*a^2*C)*x + (b^2*(2*A*b^2 + 12*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((2*a^2*A + 6*A*b^2 + 3*a^2*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(3*d) + (2*A*b*Cos[c + d*x]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(3*d) - (a*b*(4*a^2*A + 26*A*b^2 + 6*a^2*C - 21*b^2*C)*Tan[c + d*x])/(6*d) - (b*(4*a^2*A + 18*A*b^2 + 6*a^2*C - 3*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d)}
{Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, (1/8)*(3*a^4*A + 24*a^2*A*b^2 + 8*A*b^4 + 4*a^4*C + 48*a^2*b^2*C)*x + (4*a*b^3*C*ArcTanh[Sin[c + d*x]])/d + (b*(23*a^2*A + 12*A*b^2 + 36*a^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(12*d) + ((3*a^2*A + 4*A*b^2 + 4*a^2*C)*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(8*d) + (A*b*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(4*d) - (b^2*(55*a^2*A + 50*A*b^2 + 84*a^2*C - 24*b^2*C)*Tan[c + d*x])/(24*d)}
{Cos[c + d*x]^5*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, (1/2)*a*b*(3*a^2*A + 4*A*b^2 + 4*a^2*C + 8*b^2*C)*x + (b^4*C*ArcTanh[Sin[c + d*x]])/d + ((16*a^4*A + 83*a^2*A*b^2 + 6*A*b^4 + 20*a^4*C + 130*a^2*b^2*C)*Sin[c + d*x])/(30*d) + (b*(29*a^2*A + 6*A*b^2 + 40*a^2*C)*(b + a*Cos[c + d*x])*Sin[c + d*x])/(30*d) + ((4*a^2*A + 3*A*b^2 + 5*a^2*C)*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(15*d) + (A*b*(b + a*Cos[c + d*x])^3*Sin[c + d*x])/(5*d) + (A*(b + a*Cos[c + d*x])^4*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^6*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, (1/16)*(5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 6*a^4*C + 48*a^2*b^2*C + 16*b^4*C)*x + (4*a*b*(8*a^2*A + 10*A*b^2 + 10*a^2*C + 15*b^2*C)*Sin[c + d*x])/(15*d) + ((75*a^4*A + 334*a^2*A*b^2 + 8*A*b^4 + 90*a^4*C + 460*a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(240*d) + (b*(39*a^2*A + 4*A*b^2 + 50*a^2*C)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(60*d) + ((25*a^2*A + 12*A*b^2 + 30*a^2*C)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(120*d) + (2*A*b*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(15*d) + (A*Cos[c + d*x]^5*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(6*d)}
{Cos[c + d*x]^7*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 8, (1/4)*a*b*(5*a^2*A + 6*A*b^2 + 6*a^2*C + 8*b^2*C)*x + ((48*a^4*A + 336*a^2*A*b^2 + 70*A*b^4 + 56*a^4*C + 420*a^2*b^2*C + 105*b^4*C)*Sin[c + d*x])/(105*d) + (a*b*(5*a^2*A + 6*A*b^2 + 6*a^2*C + 8*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(4*d) + ((48*a^4*A + 197*a^2*A*b^2 + 2*A*b^4 + 56*a^4*C + 252*a^2*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(210*d) + (b*(103*a^2*A + 6*A*b^2 + 126*a^2*C)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(210*d) + ((6*a^2*A + 2*A*b^2 + 7*a^2*C)*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(35*d) + (2*A*b*Cos[c + d*x]^5*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(21*d) + (A*Cos[c + d*x]^6*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(7*d)}


{(a^2 - b^2*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, a^5*x + (b*(24*a^4 - 8*a^2*b^2 - 3*b^4)*ArcTanh[Sin[c + d*x]])/(8*d) + (a*b^2*(18*a^2 - 13*b^2)*Tan[c + d*x])/(8*d) + (b^2*(2*a^2 - 3*b^2)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(8*d) - (a*b^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(4*d) - (b^2*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{(a^2 - b^2*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, a^4*x + (a*b*(2*a^2 - b^2)*ArcTanh[Sin[c + d*x]])/d + (2*b^2*(a^2 - b^2)*Tan[c + d*x])/(3*d) - (a*b^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(3*d) - (b^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{(a^2 - b^2*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, a^3*x + (b*(2*a^2 - b^2)*ArcTanh[Sin[c + d*x]])/(2*d) - (a*b^2*Tan[c + d*x])/(2*d) - (b^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 7, -((a*(2*A*b^2 + 2*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^4*d)) - (2*a^2*(A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) + ((3*A*b^2 + 3*a^2*C + 2*b^2*C)*Tan[c + d*x])/(3*b^3*d) - (a*C*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*d) + (C*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*d)}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 6, ((2*A*b^2 + 2*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^3*d) + (2*a*(A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) - (a*C*Tan[c + d*x])/(b^2*d) + (C*Sec[c + d*x]*Tan[c + d*x])/(2*b*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 5, -((a*C*ArcTanh[Sin[c + d*x]])/(b^2*d)) - (2*(A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + (C*Tan[c + d*x])/(b*d)}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 4, (A*x)/a + (C*ArcTanh[Sin[c + d*x]])/(b*d) + (2*(A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*b*Sqrt[a^2 - b^2]*d)}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 4, -((A*b*x)/a^2) - (2*(A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) + (A*Sin[c + d*x])/(a*d)}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 5, ((a^2*A + 2*A*b^2 + 2*a^2*C)*x)/(2*a^3) + (2*b*(A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d) - (A*b*Sin[c + d*x])/(a^2*d) + (A*Cos[c + d*x]*Sin[c + d*x])/(2*a*d)}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 6, -((b*(a^2*A + 2*A*b^2 + 2*a^2*C)*x)/(2*a^4)) - (2*b^2*(A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*Sqrt[a^2 - b^2]*d) + ((2*a^2*A + 3*A*b^2 + 3*a^2*C)*Sin[c + d*x])/(3*a^3*d) - (A*b*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*d) + (A*Cos[c + d*x]^2*Sin[c + d*x])/(3*a*d)}
{Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 7, ((3*a^4*A + 4*a^2*A*b^2 + 8*A*b^4 + 4*a^4*C + 8*a^2*b^2*C)*x)/(8*a^5) + (2*b^3*(A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*Sqrt[a^2 - b^2]*d) - (b*(2*a^2*A + 3*A*b^2 + 3*a^2*C)*Sin[c + d*x])/(3*a^4*d) + ((3*a^2*A + 4*A*b^2 + 4*a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(8*a^3*d) - (A*b*Cos[c + d*x]^2*Sin[c + d*x])/(3*a^2*d) + (A*Cos[c + d*x]^3*Sin[c + d*x])/(4*a*d)}


{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 7, ((2*A*b^2 + 6*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^4*d) + (2*a*(a^2*A*b^2 - 2*A*b^4 + 3*a^4*C - 4*a^2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) - (a*(A*b^2 + 3*a^2*C - 2*b^2*C)*Tan[c + d*x])/(b^3*(a^2 - b^2)*d) + ((2*A*b^2 + 3*a^2*C - b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)*d) - ((A*b^2 + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 6, -((2*a*C*ArcTanh[Sin[c + d*x]])/(b^3*d)) + (2*(A*b^4 - 2*a^4*C + 3*a^2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) + ((A*b^2 + 2*a^2*C - b^2*C)*Tan[c + d*x])/(b^2*(a^2 - b^2)*d) - ((A*b^2 + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 5, (C*ArcTanh[Sin[c + d*x]])/(b^2*d) - (2*a*(A*b^2 - a^2*C + 2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) - ((A*b^2 + a^2*C)*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 3, (A*x)/a^2 + (2*b*(2*a^2*A - A*b^2 + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d) + ((A*b^2 + a^2*C)*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 5, -((2*A*b*x)/a^3) - (2*(3*a^2*A*b^2 - 2*A*b^4 + a^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) + ((a^2*A - 2*A*b^2 - a^2*C)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 6, ((a^2*A + 6*A*b^2 + 2*a^2*C)*x)/(2*a^4) + (2*b*(4*a^2*A*b^2 - 3*A*b^4 + 2*a^4*C - a^2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(3/2)*d) - (b*(2*a^2*A - 3*A*b^2 - a^2*C)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2*A - 3*A*b^2 - 2*a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 7, -((b*(a^2*A + 4*A*b^2 + 2*a^2*C)*x)/a^5) - (2*b^2*(5*a^2*A*b^2 - 4*A*b^4 + 3*a^4*C - 2*a^2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(3/2)*d) + ((2*a^4*A + 7*a^2*A*b^2 - 12*A*b^4 + 3*a^4*C - 6*a^2*b^2*C)*Sin[c + d*x])/(3*a^4*(a^2 - b^2)*d) - (b*(a^2*A - 2*A*b^2 - a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2*A - 4*A*b^2 - 3*a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^4*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 8, ((2*A*b^2 + 12*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^5*d) + (a*(2*a^4*A*b^2 - 5*a^2*A*b^4 + 6*A*b^6 + 12*a^6*C - 29*a^4*b^2*C + 20*a^2*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(5/2)*d) - (a*(2*a^2*A*b^2 - 5*A*b^4 + 12*a^4*C - 21*a^2*b^2*C + 6*b^4*C)*Tan[c + d*x])/(2*b^4*(a^2 - b^2)^2*d) + ((a^2*A*b^2 - 4*A*b^4 + 6*a^4*C - 10*a^2*b^2*C + b^4*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 + a^2*C)*Sec[c + d*x]^3*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((3*A*b^4 - 4*a^4*C + 7*a^2*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 7, -((3*a*C*ArcTanh[Sin[c + d*x]])/(b^4*d)) - ((a^2*A*b^4 + 2*A*b^6 + 6*a^6*C - 15*a^4*b^2*C + 12*a^2*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) - ((3*A*b^4 - 6*a^4*C + 11*a^2*b^2*C - 2*b^4*C)*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((a^2*A*b^2 + 2*A*b^4 - 3*a^4*C + 6*a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 6, (C*ArcTanh[Sin[c + d*x]])/(b^3*d) + (a*(3*A*b^4 + 2*a^4*C - 5*a^2*b^2*C + 6*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) - ((A*b^2 + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((2*a^2*A*b^2 + A*b^4 - 2*a^4*C + 5*a^2*b^2*C)*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 5, -(((2*a^2*A + A*b^2 + a^2*C + 2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d)) - ((A*b^2 + a^2*C)*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (a*(3*A*b^2 - a^2*C + 4*b^2*C)*Tan[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 4, (A*x)/a^3 + (b*(6*a^4*A - 5*a^2*A*b^2 + 2*A*b^4 + 3*a^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d) + ((A*b^2 + a^2*C)*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((5*a^2*A*b^2 - 2*A*b^4 + a^4*C + 2*a^2*b^2*C)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 6, -((3*A*b*x)/a^4) - ((12*a^4*A*b^2 - 15*a^2*A*b^4 + 6*A*b^6 + 2*a^6*C + a^4*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) + ((2*a^4*A - 11*a^2*A*b^2 + 6*A*b^4 - 3*a^4*C)*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((6*a^2*A*b^2 - 3*A*b^4 + 2*a^4*C + a^2*b^2*C)*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 7, ((a^2*A + 12*A*b^2 + 2*a^2*C)*x)/(2*a^5) + (b*(20*a^4*A*b^2 - 29*a^2*A*b^4 + 12*A*b^6 + 6*a^6*C - 5*a^4*b^2*C + 2*a^2*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(5/2)*d) - (b*(6*a^4*A - 21*a^2*A*b^2 + 12*A*b^4 - 5*a^4*C + 2*a^2*b^2*C)*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^2*d) + ((a^4*A - 10*a^2*A*b^2 + 6*A*b^4 - 4*a^4*C + a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((7*a^2*A*b^2 - 4*A*b^4 + 3*a^4*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^4*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 8, -((4*a*C*ArcTanh[Sin[c + d*x]])/(b^5*d)) + ((3*a^2*A*b^6 + 2*A*b^8 - 8*a^8*C + 28*a^6*b^2*C - 35*a^4*b^4*C + 20*a^2*b^6*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(7/2)*d) + ((4*a^2*A*b^4 + 11*A*b^6 + 24*a^6*C - 68*a^4*b^2*C + 65*a^2*b^4*C - 6*b^6*C)*Tan[c + d*x])/(6*b^4*(a^2 - b^2)^3*d) - ((A*b^2 + a^2*C)*Sec[c + d*x]^3*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((2*a^2*A*b^2 + 3*A*b^4 - 4*a^4*C + 9*a^2*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - ((3*a^2*A*b^4 + 2*A*b^6 + 4*a^6*C - 11*a^4*b^2*C + 12*a^2*b^4*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 7, (C*ArcTanh[Sin[c + d*x]])/(b^4*d) - (a*(a^2*A*b^4 + 4*A*b^6 - 2*a^6*C + 7*a^4*b^2*C - 8*a^2*b^4*C + 8*b^6*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(7/2)*d) - ((A*b^2 + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((3*a^2*A*b^2 + 2*A*b^4 - 3*a^4*C + 8*a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - ((13*a^2*A*b^4 + 2*A*b^6 + 6*a^6*C - 17*a^4*b^2*C + 26*a^2*b^4*C)*Tan[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 6, (b*(4*a^2*A + A*b^2 + 3*a^2*C + 2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) - ((A*b^2 + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((4*a^2*A*b^2 + A*b^4 - 2*a^4*C + 7*a^2*b^2*C)*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (a*(2*a^2*A*b^2 + 13*A*b^4 + 2*a^4*C - 5*a^2*b^2*C + 18*b^4*C)*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 6, -((a*(2*a^2*A + 3*A*b^2 + a^2*C + 4*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) - ((A*b^2 + a^2*C)*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - (a*(5*A*b^2 - a^2*C + 6*b^2*C)*Tan[c + d*x])/(6*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - ((11*a^2*A*b^2 + 4*A*b^4 - a^4*C + 10*a^2*b^2*C + 6*b^4*C)*Tan[c + d*x])/(6*b*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 5, (A*x)/a^4 + (b*(8*a^6*A - 8*a^4*A*b^2 + 7*a^2*A*b^4 - 2*A*b^6 + 4*a^6*C + a^4*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(7/2)*d) + ((A*b^2 + a^2*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((8*a^2*A*b^2 - 3*A*b^4 + 2*a^4*C + 3*a^2*b^2*C)*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((26*a^4*A*b^2 - 17*a^2*A*b^4 + 6*A*b^6 + 2*a^6*C + 13*a^4*b^2*C)*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 7, -((4*A*b*x)/a^5) - ((20*a^6*A*b^2 - 35*a^4*A*b^4 + 28*a^2*A*b^6 - 8*A*b^8 + 2*a^8*C + 3*a^6*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(7/2)*d) + ((6*a^6*A - 65*a^4*A*b^2 + 68*a^2*A*b^4 - 24*A*b^6 - 11*a^6*C - 4*a^4*b^2*C)*Sin[c + d*x])/(6*a^4*(a^2 - b^2)^3*d) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((9*a^2*A*b^2 - 4*A*b^4 + 3*a^4*C + 2*a^2*b^2*C)*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((12*a^4*A*b^2 - 11*a^2*A*b^4 + 4*A*b^6 + 2*a^6*C + 3*a^4*b^2*C)*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 8, ((a^2*A + 20*A*b^2 + 2*a^2*C)*x)/(2*a^6) + (b*(40*a^6*A*b^2 - 84*a^4*A*b^4 + 69*a^2*A*b^6 - 20*A*b^8 + 8*a^8*C - 8*a^6*b^2*C + 7*a^4*b^4*C - 2*a^2*b^6*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^6*(a^2 - b^2)^(7/2)*d) - (b*(24*a^6*A - 146*a^4*A*b^2 + 167*a^2*A*b^4 - 60*A*b^6 - 26*a^6*C + 17*a^4*b^2*C - 6*a^2*b^4*C)*Sin[c + d*x])/(6*a^5*(a^2 - b^2)^3*d) + ((a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A*b^6 - 6*a^6*C + 2*a^4*b^2*C - a^2*b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^3*d) + ((A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((10*a^2*A*b^2 - 5*A*b^4 + 4*a^4*C + a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((48*a^4*A*b^2 - 53*a^2*A*b^4 + 20*A*b^6 + 12*a^6*C + a^4*b^2*C + 2*a^2*b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}


{(a^2 - b^2*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 3, a*x - (b*ArcTanh[Sin[c + d*x]])/d}
{(a^2 - b^2*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 3, x + (4*b*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*d)}
{(a^2 - b^2*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 4, x/a + (2*b*(3*a^2 - b^2)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*(a^2 - b^2)^(3/2)*d) + (2*b^2*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{(a^2 - b^2*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 5, x/a^2 + (2*b*(4*a^4 - 2*a^2*b^2 + b^4)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(5/2)*d) + (b^2*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b^2*(4*a^2 - b^2)*Tan[c + d*x])/(a*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (A+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)*Sqrt[a + b*Sec[c + d*x]], x, 9, (2*(a + b)*(42*a^2*A*b^2 - 189*A*b^4 + 16*a^4*C + 24*a^2*b^2*C - 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(42*a^2*A*b^2 - 147*a*A*b^3 - 189*A*b^4 + 16*a^4*C + 4*a^3*b*C + 24*a^2*b^2*C - 111*a*b^3*C - 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(42*a^2*A*b^2 - 189*A*b^4 + 16*a^4*C + 24*a^2*b^2*C - 147*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*b^4*d) + (2*a*(21*A*b^2 + 8*a^2*C + 13*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^3*d) + (2*(63*A*b^2 - 6*a^2*C + 49*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^2*d) + (2*a*C*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(63*b*d) + (2*C*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)*Sqrt[a + b*Sec[c + d*x]], x, 8, -((2*a*(a + b)*(35*A*b^2 + 8*a^2*C + 19*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(35*a*A*b^2 + 35*A*b^3 + 8*a^3*C + 2*a^2*b*C + 19*a*b^2*C + 25*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(35*A*b^2 + 8*a^2*C + 19*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*b^3*d) + (2*(35*A*b^2 - 4*a^2*C + 25*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b^2*d) + (2*a*C*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*b*d) + (2*C*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)*Sqrt[a + b*Sec[c + d*x]], x, 7, -((2*(a + b)*(15*A*b^2 - 2*a^2*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(15*a*A*b + 15*A*b^2 - 2*a^2*C + 7*a*b*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(15*A*b^2 - 2*a^2*C + 9*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*b^2*d) + (2*a*C*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*b*d) + (2*C*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)*Sqrt[a + b*Sec[c + d*x]], x, 8, -((2*a*(a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(3*a*A - 3*A*b - a*C - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*C*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b*d) + (2*C*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)*Sqrt[a + b*Sec[c + d*x]], x, 8, ((a + b)*(A - 2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*C - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*A*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d - ((A - 2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)*Sqrt[a + b*Sec[c + d*x]], x, 8, (A*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a*A - A*b + 4*a*C - 4*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A - A*b^2 + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d) + (A*b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a*d)}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)*Sqrt[a + b*Sec[c + d*x]], x, 9, ((a + b)*(16*a^2*A - 3*A*b^2 + 24*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (b*(14*a*A - A*b + 24*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(4*a^2*A + A*b^2 + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*a*d) + (A*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d) + ((16*a^2*A - 3*A*b^2 + 24*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a^2*d)}
{Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2)*Sqrt[a + b*Sec[c + d*x]], x, 10, (b*(a + b)*(28*a^2*A + 15*A*b^2 + 48*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(192*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((72*a^3*A - 36*a^2*A*b + 2*a*A*b^2 + 5*A*b^3 + 96*a^3*C - 48*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(96*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^4*A - 8*a^2*A*b^2 - 5*A*b^4 + 64*a^4*C - 16*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(32*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((36*a^2*A - 5*A*b^2 + 48*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(96*a^2*d) + (A*b*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*a*d) + (A*Cos[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (b*(28*a^2*A + 15*A*b^2 + 48*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*a^3*d)}


{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 10, (4*a*(a + b)*(33*a^2*A*b^2 - 451*A*b^4 + 8*a^4*C + 18*a^2*b^2*C - 348*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(1155*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(66*a^3*A*b^2 - 561*a^2*A*b^3 - 902*a*A*b^4 - 275*A*b^5 + 16*a^5*C + 4*a^4*b*C + 36*a^3*b^2*C - 423*a^2*b^3*C - 696*a*b^4*C - 225*b^5*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(1155*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*a*(33*a^2*A*b^2 - 451*A*b^4 + 8*a^4*C + 18*a^2*b^2*C - 348*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(1155*b^4*d) + (2*(33*a^2*A*b^2 + 275*A*b^4 + 8*a^4*C + 19*a^2*b^2*C + 225*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(1155*b^3*d) + (4*a*(132*A*b^2 - 3*a^2*C + 101*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(1155*b^2*d) + (2*(33*A*b^2 + a^2*C + 27*b^2*C)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(231*b*d) + (2*a*C*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(33*d) + (2*C*Sec[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(11*d)}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, -((2*(a + b)*(63*a^2*A*b^2 + 189*A*b^4 + 8*a^4*C + 33*a^2*b^2*C + 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(63*a^2*A*b^2 + 252*a*A*b^3 + 189*A*b^4 + 8*a^4*C + 2*a^3*b*C + 33*a^2*b^2*C + 186*a*b^3*C + 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(63*a^2*A*b^2 + 189*A*b^4 + 8*a^4*C + 33*a^2*b^2*C + 147*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*b^3*d) + (4*a*(63*A*b^2 - 2*a^2*C + 44*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^2*d) + (2*(63*A*b^2 + 3*a^2*C + 49*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b*d) + (2*a*C*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(21*d) + (2*C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 8, -((4*a*(a + b)*(70*A*b^2 - 3*a^2*C + 41*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(105*a^2*A*b + 140*a*A*b^2 + 35*A*b^3 - 6*a^3*C + 51*a^2*b*C + 82*a*b^2*C + 25*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a*(70*A*b^2 - 3*a^2*C + 41*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*b^2*d) + (2*(35*A*b^2 + 3*a^2*C + 25*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b*d) + (6*a*C*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*d) + (2*C*Sec[c + d*x]*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, -((2*(a + b)*(5*A*b^2 + a^2*C + 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(5*a^2*A - 10*a*A*b - 5*A*b^2 - a^2*C - 4*a*b*C - 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^2*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(5*A*b^2 + a^2*C + 3*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(5*b*d) + (2*a*C*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*d) + (2*C*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, (a*(a + b)*(3*A - 8*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(6*a*A*b - 3*A*b^2 - 3*a^2*C - 4*a*b*C - b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (6*a*A*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/d - (a*(3*A - 8*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d) - (b*(3*A - 2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, (b*(a + b)*(5*A - 8*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a^2*A - a*A*b + 4*A*b^2 + 4*a^2*C - 8*a*b*C - 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 3*A*b^2 + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (3*A*b*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(2*d) - (b*(5*A - 8*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, ((a + b)*(16*a^2*A + 3*A*b^2 + 24*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (b*(26*a*A - 7*A*b + 48*a*C - 24*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(12*a^2*A - A*b^2 + 24*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + ((16*a^2*A + 3*A*b^2 + 24*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a*d)}
{Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 10, (b*(a + b)*(52*a^2*A - 3*A*b^2 + 80*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(64*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((24*a^3*A - 12*a^2*A*b + 38*a*A*b^2 - A*b^3 + 32*a^3*C - 16*a^2*b*C + 64*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(32*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^4*A + 24*a^2*A*b^2 + 3*A*b^4 + 64*a^4*C + 48*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(32*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((12*a^2*A + A*b^2 + 16*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(32*a*d) + (A*b*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(8*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(4*d) + (b*(52*a^2*A - 3*A*b^2 + 80*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(64*a^2*d)}


{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 11, (2*(a + b)*(1430*a^4*A*b^2 - 39897*a^2*A*b^4 - 21021*A*b^6 + 240*a^6*C + 760*a^4*b^2*C - 30669*a^2*b^4*C - 17787*b^6*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(45045*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (1/(45045*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]))*(2*(1430*a^4*A*b^2 - 22165*a^3*A*b^3 - 39897*a^2*A*b^4 - 37323*a*A*b^5 - 21021*A*b^6 + 240*a^6*C + 60*a^5*b*C + 760*a^4*b^2*C - 16685*a^3*b^3*C - 30669*a^2*b^4*C - 30831*a*b^5*C - 17787*b^6*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))]) - (2*(1430*a^4*A*b^2 - 39897*a^2*A*b^4 - 21021*A*b^6 + 240*a^6*C + 760*a^4*b^2*C - 30669*a^2*b^4*C - 17787*b^6*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(45045*b^4*d) + (2*a*(715*a^2*A*b^2 + 23309*A*b^4 + 120*a^4*C + 395*a^2*b^2*C + 18973*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(45045*b^3*d) + (2*(10725*a^2*A*b^2 + 7007*A*b^4 - 90*a^4*C + 8145*a^2*b^2*C + 5929*b^4*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(45045*b^2*d) + (2*a*(2717*A*b^2 + 15*a^2*C + 2209*b^2*C)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(9009*b*d) + (2*(143*A*b^2 + 15*a^2*C + 121*b^2*C)*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(1287*d) + (10*a*C*Sec[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(143*d) + (2*C*Sec[c + d*x]^3*(a + b*Sec[c + d*x])^(5/2)*Tan[c + d*x])/(13*d)}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, -((2*a*(a + b)*(99*a^2*A*b^2 + 957*A*b^4 + 8*a^4*C + 51*a^2*b^2*C + 741*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(693*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(99*a^3*A*b^2 + 891*a^2*A*b^3 + 957*a*A*b^4 + 165*A*b^5 + 8*a^5*C + 2*a^4*b*C + 51*a^3*b^2*C + 663*a^2*b^3*C + 741*a*b^4*C + 135*b^5*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(693*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(99*a^2*A*b^2 + 957*A*b^4 + 8*a^4*C + 51*a^2*b^2*C + 741*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(693*b^3*d) + (2*(297*a^2*A*b^2 + 165*A*b^4 - 4*a^4*C + 205*a^2*b^2*C + 135*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(693*b^2*d) + (2*a*(297*A*b^2 + 3*a^2*C + 229*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(693*b*d) + (2*(33*A*b^2 + 5*a^2*C + 27*b^2*C)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(231*d) + (10*a*C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(99*d) + (2*C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(5/2)*Tan[c + d*x])/(11*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 9, -((2*(a + b)*(483*a^2*A*b^2 + 189*A*b^4 - 10*a^4*C + 279*a^2*b^2*C + 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(315*a^3*A*b + 483*a^2*A*b^2 + 357*a*A*b^3 + 189*A*b^4 - 10*a^4*C + 155*a^3*b*C + 279*a^2*b^2*C + 261*a*b^3*C + 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(315*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(483*a^2*A*b^2 + 189*A*b^4 - 10*a^4*C + 279*a^2*b^2*C + 147*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(315*b^2*d) + (2*a*(231*A*b^2 + 5*a^2*C + 163*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b*d) + (2*(63*A*b^2 + 15*a^2*C + 49*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*d) + (10*a*C*Sec[c + d*x]*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(63*d) + (2*C*Sec[c + d*x]*(a + b*Sec[c + d*x])^(5/2)*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, -((2*a*(a + b)*(49*A*b^2 + 3*a^2*C + 29*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(21*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(21*a^3*A - 63*a^2*A*b - 49*a*A*b^2 - 7*A*b^3 - 3*a^3*C - 27*a^2*b*C - 29*a*b^2*C - 5*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(21*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^3*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(49*A*b^2 + 3*a^2*C + 29*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(21*b*d) + (2*(7*A*b^2 + 3*a^2*C + 5*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(21*d) + (2*a*C*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(7*d) + (2*C*(a + b*Sec[c + d*x])^(5/2)*Tan[c + d*x])/(7*d)}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, ((a + b)*(15*a^2*A - 30*A*b^2 - 46*a^2*C - 18*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(45*a^2*A*b - 45*a*A*b^2 - 15*A*b^3 - 15*a^3*C - 23*a^2*b*C - 17*a*b^2*C - 9*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (10*a^2*A*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/d - ((15*a^2*A - 30*A*b^2 - 46*a^2*C - 18*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d) - (a*b*(15*A - 16*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*d) - (b*(5*A - 2*C)*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, (a*b*(a + b)*(27*A - 56*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((6*a^3*A - 3*a^2*A*b + 36*a*A*b^2 - 12*A*b^3 + 12*a^3*C - 36*a^2*b*C - 28*a*b^2*C - 4*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(6*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*(4*a^2*A + 15*A*b^2 + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (5*A*b*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(4*d) + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(2*d) - (a*b*(27*A - 56*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(12*d) - (b^2*(21*A - 8*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(12*d)}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, ((a + b)*(16*a^2*A + 33*A*b^2 + 24*a^2*C - 48*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (b*(38*a^2*A - 13*a*A*b + 24*A*b^2 + 72*a^2*C - 72*a*b*C - 24*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (5*b*(4*a^2*A + A*b^2 + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((16*a^2*A + 15*A*b^2 + 24*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + (5*A*b*Cos[c + d*x]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(12*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(3*d) - ((16*a^2*A + 33*A*b^2 + 24*a^2*C - 48*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d)}
{Cos[c + d*x]^4*(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, (b*(a + b)*(284*a^2*A + 15*A*b^2 + 432*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(192*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((72*a^3*A - 36*a^2*A*b + 322*a*A*b^2 - 59*A*b^3 + 96*a^3*C - 48*a^2*b*C + 576*a*b^2*C - 192*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(96*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^4*A + 120*a^2*A*b^2 - 5*A*b^4 + 64*a^4*C + 240*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(32*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((12*a^2*A + 5*A*b^2 + 16*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(32*d) + (5*A*b*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(24*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(4*d) + (b*(284*a^2*A + 15*A*b^2 + 432*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*a*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 8, (4*a*(a + b)*(35*A*b^2 + 24*a^2*C + 22*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(70*a*A*b^2 - 35*A*b^3 + 48*a^3*C + 12*a^2*b*C + 44*a*b^2*C - 25*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*a*(35*A*b^2 + 24*a^2*C + 22*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*b^4*d) + (2*(35*A*b^2 + 24*a^2*C + 25*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b^3*d) - (12*a*C*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*b^2*d) + (2*C*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(7*b*d)}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 7, -((2*(a + b)*(15*A*b^2 + 8*a^2*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(15*A*b^2 + 8*a^2*C + 2*a*b*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(15*A*b^2 + 8*a^2*C + 9*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*b^3*d) - (8*a*C*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*b^2*d) + (2*C*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*b*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 6, (4*a*(a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b - 2*a*C + b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*a*C*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^2*d) + (2*C*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b*d)}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 7, -((2*(a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(A - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d)}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 7, (A*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*A*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d)}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 8, -((3*A*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((2*a*A - A*b + 4*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 3*A*b^2 + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*a*d) - (3*A*b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a^2*d)}
{Cos[c + d*x]^3*(A + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 9, ((a + b)*(16*a^2*A + 15*A*b^2 + 24*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (A*b*(2*a + 5*b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (b*(4*a^2*A + 5*A*b^2 + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (5*A*b*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*a^2*d) + (A*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a*d) + ((16*a^2*A + 15*A*b^2 + 24*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a^3*d)}


{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 8, -((2*(10*a^2*A*b^2 - 5*A*b^4 + 16*a^4*C - 8*a^2*b^2*C - 3*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*(a - b)*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(10*a*A*b^2 - 5*A*b^3 + 16*a^3*C - 12*a^2*b*C + 4*a*b^2*C - 3*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*(a - b)*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(10*a^2*A*b^2 - 5*A*b^4 + 16*a^4*C - 8*a^2*b^2*C - 3*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(5*b^4*(a^2 - b^2)*d) - (2*(A*b^2 + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*a*(5*A*b^2 + 8*a^2*C - 3*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*b^3*(a^2 - b^2)*d) + (2*(5*A*b^2 + 6*a^2*C - b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*b^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*a*(3*A*b^2 + 8*a^2*C - 5*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*A*b^2 + 8*a^2*C - 6*a*b*C + b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*a*(3*A*b^2 + 8*a^2*C - 5*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^3*(a^2 - b^2)*d) - (2*(A*b^2 + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b^2 + 4*a^2*C - b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 6, -((2*(A*b^2 + 2*a^2*C - b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(A*b + 2*a*C - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 + 2*a^2*C - b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b^2*(a^2 - b^2)*d) - (2*(A*b^2 + a^2*C)*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*(A*b^2 + a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*(a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A + C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 + a^2*C)*Tan[(1/2)*(c + d*x)])/(a*b*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 8, ((a^2*A - 3*A*b^2 - 2*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (6*A*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((a^2*A - 3*A*b^2 - 2*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 9, -((b*(7*a^2*A - 15*A*b^2 - 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^3*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((2*a^2*A - 3*a*A*b + 5*A*b^2 + 4*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 15*A*b^2 + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((a^2*A - 5*A*b^2 - 4*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)*d) - (b*(7*a^2*A - 15*A*b^2 - 8*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a^3*(a^2 - b^2)*d)}


{Sec[c + d*x]^3*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (4*a*(a^2*A*b^2 - 3*A*b^4 + 8*a^4*C - 14*a^2*b^2*C + 4*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^4*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^2*A*b^2 - 3*a*A*b^3 - 3*A*b^4 + 16*a^4*C - 12*a^3*b*C - 16*a^2*b^2*C + 9*a*b^3*C - b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*a*(a^2*A*b^2 - 3*A*b^4 + 8*a^4*C - 14*a^2*b^2*C + 4*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^4*(a^2 - b^2)^2*d) - (2*(A*b^2 + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (4*(2*A*b^4 - 3*a^4*C + 5*a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A*b^2 - 5*A*b^4 + 8*a^4*C - 13*a^2*b^2*C + b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 7, (2*(a^2*A*b^2 + 3*A*b^4 - 8*a^4*C + 15*a^2*b^2*C - 3*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a*A*b^2 + 3*A*b^3 - 8*a^3*C + 6*a^2*b*C + 9*a*b^2*C - 3*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a^2*A*b^2 + 3*A*b^4 - 8*a^4*C + 15*a^2*b^2*C - 3*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^3*(a^2 - b^2)^2*d) - (2*(A*b^2 + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (4*(a^2*A*b^2 + A*b^4 - 2*a^4*C + 4*a^2*b^2*C)*Tan[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 6, -((4*a*(2*A*b^2 - a^2*C + 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(3*a*A*b + A*b^2 - 2*a^2*C + 3*a*b*C + 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a*(2*A*b^2 - a^2*C + 3*b^2*C)*Tan[(1/2)*(c + d*x)])/(3*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 + a^2*C)*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(7*a^2*A*b^2 - 3*A*b^4 + a^4*C + 3*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^2*(a - b)^2*b*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a^2*A + 3*a*A*b - 2*A*b^2 + a^2*C + 3*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(7*a^2*A*b^2 - 3*A*b^4 + a^4*C + 3*a^2*b^2*C)*Tan[(1/2)*(c + d*x)])/(3*a^2*(a - b)*b*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 + a^2*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Cos[c + d*x]^1*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 9, ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 - 8*a^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(6*a^2*A*b + 3*a*A*b^2 - 5*A*b^3 + 3*a^3*C + a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (10*A*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(9*a^2*A*b^2 - 5*A*b^4 + 3*a^4*C + a^2*b^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 - 8*a^4*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^2*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 10, -((b*(33*a^4*A - 170*a^2*A*b^2 + 105*A*b^4 - 56*a^4*C + 24*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a^4*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((6*a^4*A - 9*a^3*A*b + 33*a^2*A*b^2 + 21*a*A*b^3 - 35*A*b^4 + 12*a^4*C + 12*a^3*b*C - 8*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(6*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 35*A*b^2 + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(11*a^2*A*b^2 - 7*A*b^4 + 5*a^4*C - a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^4*A - 54*a^2*A*b^2 + 35*A*b^4 - 24*a^4*C + 8*a^2*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^2*d) - (b*(33*a^4*A - 170*a^2*A*b^2 + 105*A*b^4 - 56*a^4*C + 24*a^2*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(12*a^4*(a^2 - b^2)^2*d)}


{Sec[c + d*x]^0*(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(7/2), x, 9, (2*(58*a^4*A*b^2 - 41*a^2*A*b^4 + 15*A*b^6 + 3*a^6*C + 29*a^4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*a^3*(a - b)^3*b*(a + b)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(15*a^4*A + 30*a^3*A*b - 17*a^2*A*b^2 - 6*a*A*b^3 + 10*A*b^4 + 3*a^4*C + 24*a^3*b*C + 5*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*a^2*(a - b)^3*(a + b)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(58*a^4*A*b^2 - 41*a^2*A*b^4 + 15*A*b^6 + 3*a^6*C + 29*a^4*b^2*C)*Tan[(1/2)*(c + d*x)])/(15*a^3*(a - b)^2*b*(a + b)^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 + a^2*C)*Tan[c + d*x])/(5*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(5/2)) + (2*(13*a^2*A*b^2 - 5*A*b^4 + 3*a^4*C + 5*a^2*b^2*C)*Tan[c + d*x])/(15*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^(3/2))}


{(a^2 - b^2*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, -((2*b*(a + b)*(4*a^2 - 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(5*a^4 - 10*a^3*b - 4*a^2*b^2 + 4*a*b^3 + 3*b^4)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(5*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(4*a^2 - 3*b^2)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(5*d) - (2*a*b^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*d) - (2*b^2*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{(a^2 - b^2*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 8, (2*a*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a^3 - 3*a^2*b + a*b^2 + b^3)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^3*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*a*b*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d) - (2*b^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{(a^2 - b^2*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(1/2), x, 7, (2*b*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a^2 + b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^2*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{(a^2 - b^2*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 5, -((2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (4*a*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(a^2 - b^2*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (4*b*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (4*b*Tan[(1/2)*(c + d*x)])/((a + b)*d*Sqrt[a + b*Sec[c + d*x]])}
{(a^2 - b^2*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(7/2), x, 9, (2*b*(11*a^2 - 3*b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a^2 + 6*a*b - b^2)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(11*a^2 - 3*b^2)*Tan[(1/2)*(c + d*x)])/(3*a*(a - b)*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (4*b^2*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Subsubsection:: *)
(*n>0*)


(* ::Subsubsection:: *)
(*n<0*)


{(A + C*Sec[c + d*x]^2)/(Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])), x, 7, (2*A*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d) - (2*A*b*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*d) + (2*(A*b^2 + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a + b)*d)}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/2)*)
(**)


(* ::Subsubsection:: *)
(*n>0*)


(* ::Subsubsection:: *)
(*n<0*)


{(A + C*Sec[c + d*x]^2)/(Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]), x, 9, (2*A*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]]) - (2*A*b*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form (A+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/3)*)
(**)


{(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(2/3), x, 1, Int[(a + b*Sec[c + d*x])^(2/3)*(A + C*Sec[c + d*x]^2), x]}
{(A + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/3), x, 1, Int[(a + b*Sec[c + d*x])^(1/3)*(A + C*Sec[c + d*x]^2), x]}
{(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(1/3), x, 0, Int[(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(1/3), x]}
{(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(2/3), x, 0, Int[(A + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(2/3), x]}


(* ::Subsection:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Subsection:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/2)*)


(* ::Section:: *)
(*Sec[c+d x]^m (B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 6, (3*(b*B + a*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*(5*a*B + 4*b*C)*Tan[c + d*x])/(15*d) + (3*(b*B + a*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((5*a*B + 4*b*C)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + ((5*b*B + a*C)*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (C*Sec[c + d*x]^3*(a + b*Sec[c + d*x])*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 5, ((4*a*B + 3*b*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*(b*B + a*C)*Tan[c + d*x])/(3*d) + ((4*a*B + 3*b*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((4*b*B + a*C)*Sec[c + d*x]^2*Tan[c + d*x])/(12*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, ((b*B + a*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((3*a*B + 2*b*C)*Tan[c + d*x])/(3*d) + ((3*b*B + a*C)*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, ((2*a*B + b*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((2*b*B + a*C)*Tan[c + d*x])/(2*d) + (C*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, a*B*x + ((b*B + a*C)*ArcTanh[Sin[c + d*x]])/d + (b*C*Tan[c + d*x])/d}
{Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, (b*B + a*C)*x + (b*C*ArcTanh[Sin[c + d*x]])/d + (a*B*Sin[c + d*x])/d}
{Cos[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, (1/2)*(a*B + 2*b*C)*x + ((b*B + a*C)*Sin[c + d*x])/d + (a*B*Cos[c + d*x]*Sin[c + d*x])/(2*d)}
{Cos[c + d*x]^4*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 5, (1/2)*(b*B + a*C)*x + ((2*a*B + 3*b*C)*Sin[c + d*x])/(3*d) + ((b*B + a*C)*Cos[c + d*x]*Sin[c + d*x])/(2*d) + (a*B*Cos[c + d*x]^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^5*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 6, (1/8)*(3*a*B + 4*b*C)*x + (2*(b*B + a*C)*Sin[c + d*x])/(3*d) + ((3*a*B + 4*b*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((b*B + a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*d) + (a*B*Cos[c + d*x]^3*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^6*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 7, (3/8)*(b*B + a*C)*x + (2*(4*a*B + 5*b*C)*Sin[c + d*x])/(15*d) + (3*(b*B + a*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((4*a*B + 5*b*C)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + ((b*B + a*C)*Cos[c + d*x]^3*Sin[c + d*x])/(4*d) + (a*B*Cos[c + d*x]^4*Sin[c + d*x])/(5*d)}


{Sec[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 6, ((4*a^2*B + 3*b^2*B + 6*a*b*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*(10*a*b*B + 5*a^2*C + 4*b^2*C)*Tan[c + d*x])/(15*d) + ((4*a^2*B + 3*b^2*B + 6*a*b*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((25*a*b*B + 2*a^2*C + 16*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(60*d) + ((5*b*B + 2*a*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(20*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, ((8*a*b*B + 4*a^2*C + 3*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((3*a^2*B + 2*b^2*B + 4*a*b*C)*Tan[c + d*x])/(3*d) + ((16*a*b*B + 2*a^2*C + 9*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + ((2*b*B + a*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, ((2*a^2*B + b^2*B + 2*a*b*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((9*a*b*B + 2*a^2*C + 4*b^2*C)*Tan[c + d*x])/(6*d) + ((3*b*B + 2*a*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (C*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, a^2*B*x + ((4*a*b*B + 2*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (b*(2*b*B + 3*a*C)*Tan[c + d*x])/(2*d) + (b*C*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, (2*a*b*B + a^2*C)*x + (b*(b*B + 2*a*C)*ArcTanh[Sin[c + d*x]])/d + (a*B*(a + b*Sec[c + d*x])*Sin[c + d*x])/d - (b*(a*B - b*C)*Tan[c + d*x])/d}
{Cos[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, (1/2)*(a^2*B + 2*b^2*B + 4*a*b*C)*x + (b^2*C*ArcTanh[Sin[c + d*x]])/d + (a*(3*b*B + 2*a*C)*Sin[c + d*x])/(2*d) + (a*B*(b + a*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Cos[c + d*x]^4*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, (1/2)*(2*a*b*B + a^2*C + 2*b^2*C)*x + ((2*a^2*B + 3*b^2*B + 6*a*b*C)*Sin[c + d*x])/(3*d) + (a*(4*b*B + 3*a*C)*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (a*B*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^5*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 6, (1/8)*(3*a^2*B + 4*b^2*B + 8*a*b*C)*x + ((4*a*b*B + 2*a^2*C + 3*b^2*C)*Sin[c + d*x])/(3*d) + ((3*a^2*B + 4*b^2*B + 8*a*b*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*(5*b*B + 4*a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(12*d) + (a*B*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^6*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 7, (1/8)*(6*a*b*B + 3*a^2*C + 4*b^2*C)*x + (2*(4*a^2*B + 5*b^2*B + 10*a*b*C)*Sin[c + d*x])/(15*d) + ((6*a*b*B + 3*a^2*C + 4*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((4*a^2*B + 5*b^2*B + 10*a*b*C)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + (a*(6*b*B + 5*a*C)*Cos[c + d*x]^3*Sin[c + d*x])/(20*d) + (a*B*Cos[c + d*x]^4*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}


{Sec[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 7, ((8*a^3*B + 18*a*b^2*B + 18*a^2*b*C + 5*b^3*C)*ArcTanh[Sin[c + d*x]])/(16*d) + (2*(15*a^2*b*B + 4*b^3*B + 5*a^3*C + 12*a*b^2*C)*Tan[c + d*x])/(15*d) + ((8*a^3*B + 18*a*b^2*B + 18*a^2*b*C + 5*b^3*C)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + ((54*a^2*b*B + 32*b^3*B + 2*a^3*C + 71*a*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(120*d) + ((42*a*b*B + 6*a^2*C + 25*b^2*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(120*d) + ((2*b*B + a*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(10*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(6*d)}
{Sec[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, ((12*a^2*b*B + 3*b^3*B + 4*a^3*C + 9*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((15*a^3*B + 30*a*b^2*B + 30*a^2*b*C + 8*b^3*C)*Tan[c + d*x])/(15*d) + ((90*a^2*b*B + 45*b^3*B + 6*a^3*C + 103*a*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(120*d) + ((15*a*b*B + 3*a^2*C + 8*b^2*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(30*d) + ((5*b*B + 3*a*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(20*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, ((8*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 3*b^3*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((44*a^2*b*B + 16*b^3*B + 6*a^3*C + 39*a*b^2*C)*Tan[c + d*x])/(24*d) + ((20*a*b*B + 6*a^2*C + 9*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(24*d) + ((4*b*B + 3*a*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (C*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Cos[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, a^3*B*x + ((6*a^2*b*B + b^3*B + 2*a^3*C + 3*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (b*(15*a*b*B + 11*a^2*C + 4*b^2*C)*Tan[c + d*x])/(6*d) + (b*(3*b*B + 5*a*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (b*C*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, a^2*(3*b*B + a*C)*x + (b*(6*a*b*B + 6*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (a*B*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/d - (b*(2*a^2*B - 2*b^2*B - 5*a*b*C)*Tan[c + d*x])/(2*d) - (b*(2*a*B - b*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/2)*a*(a^2*B + 6*b^2*B + 6*a*b*C)*x + (b^2*(b*B + 3*a*C)*ArcTanh[Sin[c + d*x]])/d + (a*(2*b*B + a*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/d + (a*B*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) - (b*(5*a*b*B + 2*a^2*C - 2*b^2*C)*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^4*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/2)*(3*a^2*b*B + 2*b^3*B + a^3*C + 6*a*b^2*C)*x + (b^3*C*ArcTanh[Sin[c + d*x]])/d + (a*(4*a^2*B + 11*b^2*B + 15*a*b*C)*Sin[c + d*x])/(6*d) + (a*(5*b*B + 3*a*C)*(b + a*Cos[c + d*x])*Sin[c + d*x])/(6*d) + (a*B*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^5*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/8)*(3*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 8*b^3*C)*x + ((6*a^2*b*B + 3*b^3*B + 2*a^3*C + 9*a*b^2*C)*Sin[c + d*x])/(3*d) + (a*(9*a^2*B + 18*b^2*B + 28*a*b*C)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + (a*(3*b*B + 2*a*C)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(6*d) + (a*B*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^6*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 7, (1/8)*(9*a^2*b*B + 4*b^3*B + 3*a^3*C + 12*a*b^2*C)*x + ((8*a^3*B + 30*a*b^2*B + 30*a^2*b*C + 15*b^3*C)*Sin[c + d*x])/(15*d) + ((9*a^2*b*B + 4*b^3*B + 3*a^3*C + 12*a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + (a*(16*a^2*B + 27*b^2*B + 45*a*b*C)*Cos[c + d*x]^2*Sin[c + d*x])/(60*d) + (a*(7*b*B + 5*a*C)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(20*d) + (a*B*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 7, ((2*a^2*b*B + b^3*B - 2*a^3*C - a*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^4*d) + (2*a^3*(b*B - a*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) - ((3*a*b*B - 3*a^2*C - 2*b^2*C)*Tan[c + d*x])/(3*b^3*d) + ((b*B - a*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*d) + (C*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*d)}
{Sec[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 6, -(((2*a*b*B - 2*a^2*C - b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^3*d)) - (2*a^2*(b*B - a*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) + ((b*B - a*C)*Tan[c + d*x])/(b^2*d) + (C*Sec[c + d*x]*Tan[c + d*x])/(2*b*d)}
{Sec[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 6, ((b*B - a*C)*ArcTanh[Sin[c + d*x]])/(b^2*d) + (2*a*(b*B - a*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + (C*Tan[c + d*x])/(b*d)}
{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 4, (C*ArcTanh[Sin[c + d*x]])/(b*d) - (2*(b*B - a*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b*Sqrt[a^2 - b^2]*d)}
{Cos[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 3, (B*x)/a + (2*(b*B - a*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2]*d)}
{Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 5, -(((b*B - a*C)*x)/a^2) - (2*b*(b*B - a*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) + (B*Sin[c + d*x])/(a*d)}
{Cos[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 6, ((a^2*B + 2*b^2*B - 2*a*b*C)*x)/(2*a^3) + (2*b^2*(b*B - a*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d) - ((b*B - a*C)*Sin[c + d*x])/(a^2*d) + (B*Cos[c + d*x]*Sin[c + d*x])/(2*a*d)}
{Cos[c + d*x]^4*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 7, -(((a^2*b*B + 2*b^3*B - a^3*C - 2*a*b^2*C)*x)/(2*a^4)) - (2*b^3*(b*B - a*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*Sqrt[a^2 - b^2]*d) + ((2*a^2*B + 3*b^2*B - 3*a*b*C)*Sin[c + d*x])/(3*a^3*d) - ((b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*d) + (B*Cos[c + d*x]^2*Sin[c + d*x])/(3*a*d)}


{Sec[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 7, -(((4*a*b*B - 6*a^2*C - b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^4*d)) - (2*a^2*(2*a^2*b*B - 3*b^3*B - 3*a^3*C + 4*a*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) + ((2*a^2*b*B - b^3*B - 3*a^3*C + 2*a*b^2*C)*Tan[c + d*x])/(b^3*(a^2 - b^2)*d) - ((2*a*b*B - 3*a^2*C + b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)*d) + (a*(b*B - a*C)*Sec[c + d*x]^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 6, ((b*B - 2*a*C)*ArcTanh[Sin[c + d*x]])/(b^3*d) + (2*a*(a^2*b*B - 2*b^3*B - 2*a^3*C + 3*a*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) - ((a*b*B - 2*a^2*C + b^2*C)*Tan[c + d*x])/(b^2*(a^2 - b^2)*d) + (a*(b*B - a*C)*Sec[c + d*x]*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 5, (C*ArcTanh[Sin[c + d*x]])/(b^2*d) + (2*(b^3*B + a^3*C - 2*a*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) + (a*(b*B - a*C)*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 4, -((2*(a*B - b*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(3/2)*d)) - ((b*B - a*C)*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 5, (B*x)/a^2 + (2*(2*a^2*b*B - b^3*B - a^3*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d) + ((b*B - a*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d) - ((b*B - a*C)*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 6, -(((2*b*B - a*C)*x)/a^3) - (2*b*(3*a^2*b*B - 2*b^3*B - 2*a^3*C + a*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) + ((a^2*B - 2*b^2*B + a*b*C)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d) + ((b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(a*(a^2 - b^2)*d) - ((b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 7, ((a^2*B + 6*b^2*B - 4*a*b*C)*x)/(2*a^4) + (2*b^2*(4*a^2*b*B - 3*b^3*B - 3*a^3*C + 2*a*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(3/2)*d) - ((2*a^2*b*B - 3*b^3*B - a^3*C + 2*a*b^2*C)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2*B - 3*b^2*B + 2*a*b*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)*d) + ((b*B - a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(a*(a^2 - b^2)*d) - ((b*B - a*C)*Cos[c + d*x]^2*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^3*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 7, ((b*B - 3*a*C)*ArcTanh[Sin[c + d*x]])/(b^4*d) + (a*(2*a^4*b*B - 5*a^2*b^3*B + 6*b^5*B - 6*a^5*C + 15*a^3*b^2*C - 12*a*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) - ((2*a^3*b*B - 5*a*b^3*B - 6*a^4*C + 11*a^2*b^2*C - 2*b^4*C)*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) + (a*(b*B - a*C)*Sec[c + d*x]^2*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (a*(a^2*b*B - 4*b^3*B - 3*a^3*C + 6*a*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 6, (C*ArcTanh[Sin[c + d*x]])/(b^3*d) - ((a^2*b^3*B + 2*b^5*B - 2*a^5*C + 5*a^3*b^2*C - 6*a*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) + (a*(b*B - a*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - (a*(3*b^3*B + 2*a^3*C - 5*a*b^2*C)*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 5, ((3*a*b*B - a^2*C - 2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d) + (a*(b*B - a*C)*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((a^2*b*B + 2*b^3*B + a^3*C - 4*a*b^2*C)*Tan[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 5, -(((2*a^2*B + b^2*B - 3*a*b*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d)) - ((b*B - a*C)*Tan[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - ((3*a*b*B - a^2*C - 2*b^2*C)*Tan[c + d*x])/(2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 6, (B*x)/a^3 + ((6*a^4*b*B - 5*a^2*b^3*B + 2*b^5*B - 2*a^5*C - a^3*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d) + ((5*a^2*b*B - 2*b^3*B - 3*a^3*C)*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d) - ((b*B - a*C)*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - ((4*a^2*b*B - b^3*B - 2*a^3*C - a*b^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 7, -(((3*b*B - a*C)*x)/a^4) - (b*(12*a^4*b*B - 15*a^2*b^3*B + 6*b^5*B - 6*a^5*C + 5*a^3*b^2*C - 2*a*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) + ((2*a^4*B - 11*a^2*b^2*B + 6*b^4*B + 5*a^3*b*C - 2*a*b^3*C)*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((6*a^2*b*B - 3*b^3*B - 4*a^3*C + a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d) - ((b*B - a*C)*Cos[c + d*x]*Sin[c + d*x])/(2*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - ((5*a^2*b*B - 2*b^3*B - 3*a^3*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 6, -((2*(a + b)*(3*b*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(3*a*B + 3*b*B + a*C + b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*b*B + a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b*d) + (2*C*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}


{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 7, -((2*(a + b)*(20*a*b*B + 3*a^2*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(15*a^2*B + 20*a*b*B + 5*b^2*B + 3*a^2*C + 12*a*b*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(20*a*b*B + 3*a^2*C + 9*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*b*d) + (2*(5*b*B + 3*a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*d) + (2*C*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(1/2), x, 5, -((2*(a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(B + C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d)}


{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 5, -((2*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(B - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(b*B - a*C)*Tan[(1/2)*(c + d*x)])/(b*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])}


{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 6, -((2*(4*a*b*B - a^2*C - 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(3*a*B + b*B - a*C - 3*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(4*a*b*B - a^2*C - 3*b^2*C)*Tan[(1/2)*(c + d*x)])/(3*(a - b)*b*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(b*B - a*C)*Tan[c + d*x])/(3*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}


{Sec[c + d*x]^0*(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(7/2), x, 7, -((2*(23*a^2*b*B + 9*b^3*B - 3*a^3*C - 29*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*(a - b)^3*b*(a + b)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(15*a^2*B + 8*a*b*B + 9*b^2*B - 3*a^2*C - 24*a*b*C - 5*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*(a - b)^3*(a + b)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(23*a^2*b*B + 9*b^3*B - 3*a^3*C - 29*a*b^2*C)*Tan[(1/2)*(c + d*x)])/(15*(a - b)^2*b*(a + b)^3*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(b*B - a*C)*Tan[c + d*x])/(5*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(5/2)) - (2*(8*a*b*B - 3*a^2*C - 5*b^2*C)*Tan[c + d*x])/(15*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^(3/2))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Subsubsection:: *)
(*n>0*)


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])), x, 5, (2*B*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d) - (2*(b*B - a*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a + b)*d)}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/2)*)
(**)


(* ::Subsubsection:: *)
(*n>0*)


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]), x, 6, (2*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form (B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/3)*)
(**)


{(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(2/3), x, 1, Int[(a + b*Sec[c + d*x])^(2/3)*(B*Sec[c + d*x] + C*Sec[c + d*x]^2), x]}
{(B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/3), x, 1, Int[(a + b*Sec[c + d*x])^(1/3)*(B*Sec[c + d*x] + C*Sec[c + d*x]^2), x]}
{(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(1/3), x, 0, Int[(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(1/3), x]}
{(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(2/3), x, 0, Int[(B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(2/3), x]}


(* ::Subsection:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Subsection:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/2)*)


(* ::Section:: *)
(*Sec[c+d x]^m (A+B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (A+B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 6, ((4*a*A + 3*b*B + 3*a*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (2*(5*A*b + 5*a*B + 4*b*C)*Tan[c + d*x])/(15*d) + ((4*a*A + 3*b*B + 3*a*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((5*A*b + 5*a*B + 4*b*C)*Sec[c + d*x]^2*Tan[c + d*x])/(15*d) + ((5*b*B + a*C)*Sec[c + d*x]^3*Tan[c + d*x])/(20*d) + (C*Sec[c + d*x]^3*(a + b*Sec[c + d*x])*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 5, ((4*A*b + 4*a*B + 3*b*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((3*a*A + 2*b*B + 2*a*C)*Tan[c + d*x])/(3*d) + ((4*A*b + 4*a*B + 3*b*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((4*b*B + a*C)*Sec[c + d*x]^2*Tan[c + d*x])/(12*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, ((2*a*A + b*B + a*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((3*A*b + 3*a*B + 2*b*C)*Tan[c + d*x])/(3*d) + ((3*b*B + a*C)*Sec[c + d*x]*Tan[c + d*x])/(6*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(3*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, a*A*x + ((2*A*b + 2*a*B + b*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((2*b*B + a*C)*Tan[c + d*x])/(2*d) + (C*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, A*b*x + a*B*x + ((b*B + a*C)*ArcTanh[Sin[c + d*x]])/d + (A*(a + b*Sec[c + d*x])*Sin[c + d*x])/d - (b*(A - C)*Tan[c + d*x])/d}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, (1/2)*(a*A + 2*b*B + 2*a*C)*x + (b*C*ArcTanh[Sin[c + d*x]])/d + ((A*b + 2*a*B)*Sin[c + d*x])/(2*d) + (A*(b + a*Cos[c + d*x])*Sin[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, (1/2)*(A*b + a*B + 2*b*C)*x + ((2*a*A + 3*b*B + 3*a*C)*Sin[c + d*x])/(3*d) + ((A*b + 3*a*B)*Cos[c + d*x]*Sin[c + d*x])/(6*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 5, (1/8)*(3*a*A + 4*b*B + 4*a*C)*x + ((2*A*b + 2*a*B + 3*b*C)*Sin[c + d*x])/(3*d) + ((3*a*A + 4*b*B + 4*a*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((A*b + 4*a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(12*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 6, (1/8)*(3*A*b + 3*a*B + 4*b*C)*x + (2*(4*a*A + 5*b*B + 5*a*C)*Sin[c + d*x])/(15*d) + ((3*A*b + 3*a*B + 4*b*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((4*a*A + 5*b*B + 5*a*C)*Cos[c + d*x]^2*Sin[c + d*x])/(15*d) + ((A*b + 5*a*B)*Cos[c + d*x]^3*Sin[c + d*x])/(20*d) + (A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}


{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 6, ((8*a*A*b + 4*a^2*B + 3*b^2*B + 6*a*b*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((15*a^2*A + 10*A*b^2 + 20*a*b*B + 10*a^2*C + 8*b^2*C)*Tan[c + d*x])/(15*d) + ((8*a*A*b + 4*a^2*B + 3*b^2*B + 6*a*b*C)*Sec[c + d*x]*Tan[c + d*x])/(8*d) + ((20*A*b^2 + 25*a*b*B + 2*a^2*C + 16*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(60*d) + ((5*b*B + 2*a*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(20*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, ((8*a^2*A + 4*A*b^2 + 8*a*b*B + 4*a^2*C + 3*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((6*a*A*b + 3*a^2*B + 2*b^2*B + 4*a*b*C)*Tan[c + d*x])/(3*d) + ((12*A*b^2 + 16*a*b*B + 2*a^2*C + 9*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + ((2*b*B + a*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(4*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, a^2*A*x + ((4*a*A*b + 2*a^2*B + b^2*B + 2*a*b*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((6*A*b^2 + 9*a*b*B + 2*a^2*C + 4*b^2*C)*Tan[c + d*x])/(6*d) + ((3*b*B + 2*a*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (C*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, a*(2*A*b + a*B)*x + ((2*A*b^2 + 4*a*b*B + 2*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/d - (b*(2*a*A - 2*b*B - 3*a*C)*Tan[c + d*x])/(2*d) - (b*(2*A - C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, (1/2)*a^2*A*x + A*b^2*x + 2*a*b*B*x + a^2*C*x + (b*(b*B + 2*a*C)*ArcTanh[Sin[c + d*x]])/d + ((A*b + a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/d + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) - (b*(3*A*b + 2*a*B - 2*b*C)*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, ((2*a*A*b + a^2*B + 2*b^2*B + 4*a*b*C)*x)/2 + (b^2*C*ArcTanh[Sin[c + d*x]])/d + ((4*a^2*A + 2*A*b^2 + 9*a*b*B + 6*a^2*C)*Sin[c + d*x])/(6*d) + ((2*A*b + 3*a*B)*(b + a*Cos[c + d*x])*Sin[c + d*x])/(6*d) + (A*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, (1/8)*(3*a^2*A + 4*A*b^2 + 8*a*b*B + 4*a^2*C + 8*b^2*C)*x + ((4*a*A*b + 2*a^2*B + 3*b^2*B + 6*a*b*C)*Sin[c + d*x])/(3*d) + ((9*a^2*A + 2*A*b^2 + 16*a*b*B + 12*a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(24*d) + ((A*b + 2*a*B)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(6*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 6, (1/8)*(6*a*A*b + 3*a^2*B + 4*b^2*B + 8*a*b*C)*x + ((8*a^2*A + 10*A*b^2 + 20*a*b*B + 10*a^2*C + 15*b^2*C)*Sin[c + d*x])/(15*d) + ((6*a*A*b + 3*a^2*B + 4*b^2*B + 8*a*b*C)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((16*a^2*A + 2*A*b^2 + 25*a*b*B + 20*a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(60*d) + ((2*A*b + 5*a*B)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(20*d) + (A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d)}


{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 7, ((24*a^2*A*b + 6*A*b^3 + 8*a^3*B + 18*a*b^2*B + 18*a^2*b*C + 5*b^3*C)*ArcTanh[Sin[c + d*x]])/(16*d) + ((15*a^3*A + 30*a*A*b^2 + 30*a^2*b*B + 8*b^3*B + 10*a^3*C + 24*a*b^2*C)*Tan[c + d*x])/(15*d) + ((24*a^2*A*b + 6*A*b^3 + 8*a^3*B + 18*a*b^2*B + 18*a^2*b*C + 5*b^3*C)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + ((90*a*A*b^2 + 54*a^2*b*B + 32*b^3*B + 2*a^3*C + 71*a*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(120*d) + ((30*A*b^2 + 42*a*b*B + 6*a^2*C + 25*b^2*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(120*d) + ((2*b*B + a*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(10*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(6*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, ((8*a^3*A + 12*a*A*b^2 + 12*a^2*b*B + 3*b^3*B + 4*a^3*C + 9*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((45*a^2*A*b + 10*A*b^3 + 15*a^3*B + 30*a*b^2*B + 30*a^2*b*C + 8*b^3*C)*Tan[c + d*x])/(15*d) + ((140*a*A*b^2 + 90*a^2*b*B + 45*b^3*B + 6*a^3*C + 103*a*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(120*d) + ((10*A*b^2 + 15*a*b*B + 3*a^2*C + 8*b^2*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(30*d) + ((5*b*B + 3*a*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(20*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, a^3*A*x + ((24*a^2*A*b + 4*A*b^3 + 8*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 3*b^3*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((60*a*A*b^2 + 44*a^2*b*B + 16*b^3*B + 6*a^3*C + 39*a*b^2*C)*Tan[c + d*x])/(24*d) + ((12*A*b^2 + 20*a*b*B + 6*a^2*C + 9*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(24*d) + ((4*b*B + 3*a*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (C*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, a^2*(3*A*b + a*B)*x + ((6*a*A*b^2 + 6*a^2*b*B + b^3*B + 2*a^3*C + 3*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (A*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/d - (b*(6*a^2*A - 6*A*b^2 - 15*a*b*B - 11*a^2*C - 4*b^2*C)*Tan[c + d*x])/(6*d) - (b*(6*a*A - 3*b*B - 5*a*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) - (b*(3*A - C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/2)*a*(a^2*A + 6*A*b^2 + 6*a*b*B + 2*a^2*C)*x + (b*(2*A*b^2 + 6*a*b*B + 6*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((3*A*b + 2*a*B)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(2*d) - (b*(5*a*A*b + 2*a^2*B - 2*b^2*B - 5*a*b*C)*Tan[c + d*x])/(2*d) - (b*(4*A*b + 2*a*B - b*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/2)*(3*a^2*A*b + 2*A*b^3 + a^3*B + 6*a*b^2*B + 6*a^2*b*C)*x + (b^2*(b*B + 3*a*C)*ArcTanh[Sin[c + d*x]])/d + ((2*a^2*A + 3*A*b^2 + 6*a*b*B + 3*a^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d) + ((A*b + a*B)*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d) - (b*(4*a^2*A + 11*A*b^2 + 15*a*b*B + 6*a^2*C - 6*b^2*C)*Tan[c + d*x])/(6*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, ((3*a^3*A + 12*a*A*b^2 + 12*a^2*b*B + 8*b^3*B + 4*a^3*C + 24*a*b^2*C)*x)/8 + (b^3*C*ArcTanh[Sin[c + d*x]])/d + ((39*a^2*A*b + 6*A*b^3 + 16*a^3*B + 44*a*b^2*B + 60*a^2*b*C)*Sin[c + d*x])/(24*d) + ((9*a^2*A + 6*A*b^2 + 20*a*b*B + 12*a^2*C)*(b + a*Cos[c + d*x])*Sin[c + d*x])/(24*d) + ((3*A*b + 4*a*B)*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(12*d) + (A*(b + a*Cos[c + d*x])^3*Sin[c + d*x])/(4*d)}
{Cos[c + d*x]^5*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, (1/8)*(9*a^2*A*b + 4*A*b^3 + 3*a^3*B + 12*a*b^2*B + 12*a^2*b*C + 8*b^3*C)*x + ((8*a^3*A + 30*a*A*b^2 + 30*a^2*b*B + 15*b^3*B + 10*a^3*C + 45*a*b^2*C)*Sin[c + d*x])/(15*d) + ((103*a^2*A*b + 6*A*b^3 + 45*a^3*B + 90*a*b^2*B + 140*a^2*b*C)*Cos[c + d*x]*Sin[c + d*x])/(120*d) + ((8*a^2*A + 3*A*b^2 + 15*a*b*B + 10*a^2*C)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x])/(30*d) + ((3*A*b + 5*a*B)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(20*d) + (A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^6*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 7, (1/16)*(5*a^3*A + 18*a*A*b^2 + 18*a^2*b*B + 8*b^3*B + 6*a^3*C + 24*a*b^2*C)*x + ((24*a^2*A*b + 10*A*b^3 + 8*a^3*B + 30*a*b^2*B + 30*a^2*b*C + 15*b^3*C)*Sin[c + d*x])/(15*d) + ((5*a^3*A + 18*a*A*b^2 + 18*a^2*b*B + 8*b^3*B + 6*a^3*C + 24*a*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + ((71*a^2*A*b + 2*A*b^3 + 32*a^3*B + 54*a*b^2*B + 90*a^2*b*C)*Cos[c + d*x]^2*Sin[c + d*x])/(120*d) + (1/(120*d))*((25*a^2*A + 6*A*b^2 + 42*a*b*B + 30*a^2*C)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x]) + ((A*b + 2*a*B)*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(10*d) + (A*Cos[c + d*x]^5*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(6*d)}


{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 8, ((32*a^3*A*b + 24*a*A*b^3 + 8*a^4*B + 36*a^2*b^2*B + 5*b^4*B + 24*a^3*b*C + 20*a*b^3*C)*ArcTanh[Sin[c + d*x]])/(16*d) + ((105*a^4*A + 420*a^2*A*b^2 + 56*A*b^4 + 280*a^3*b*B + 224*a*b^3*B + 70*a^4*C + 336*a^2*b^2*C + 48*b^4*C)*Tan[c + d*x])/(105*d) + ((32*a^3*A*b + 24*a*A*b^3 + 8*a^4*B + 36*a^2*b^2*B + 5*b^4*B + 24*a^3*b*C + 20*a*b^3*C)*Sec[c + d*x]*Tan[c + d*x])/(16*d) + ((1008*a^2*A*b^2 + 224*A*b^4 + 392*a^3*b*B + 721*a*b^3*B + 8*a^4*C + 788*a^2*b^2*C + 192*b^4*C)*Sec[c + d*x]^2*Tan[c + d*x])/(840*d) + ((504*a*A*b^2 + 336*a^2*b*B + 175*b^3*B + 24*a^3*C + 412*a*b^2*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/(840*d) + ((14*A*b^2 + 21*a*b*B + 4*a^2*C + 12*b^2*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(70*d) + ((7*b*B + 4*a*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(42*d) + (C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^4*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, ((16*a^4*A + 48*a^2*A*b^2 + 6*A*b^4 + 32*a^3*b*B + 24*a*b^3*B + 8*a^4*C + 36*a^2*b^2*C + 5*b^4*C)*ArcTanh[Sin[c + d*x]])/(16*d) + ((60*a^3*A*b + 40*a*A*b^3 + 15*a^4*B + 60*a^2*b^2*B + 8*b^4*B + 40*a^3*b*C + 32*a*b^3*C)*Tan[c + d*x])/(15*d) + ((460*a^2*A*b^2 + 90*A*b^4 + 192*a^3*b*B + 296*a*b^3*B + 8*a^4*C + 334*a^2*b^2*C + 75*b^4*C)*Sec[c + d*x]*Tan[c + d*x])/(240*d) + ((50*a*A*b^2 + 36*a^2*b*B + 16*b^3*B + 4*a^3*C + 39*a*b^2*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])*Tan[c + d*x])/(60*d) + ((30*A*b^2 + 48*a*b*B + 12*a^2*C + 25*b^2*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(120*d) + ((3*b*B + 2*a*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(15*d) + (C*Sec[c + d*x]*(a + b*Sec[c + d*x])^4*Tan[c + d*x])/(6*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, a^4*A*x + ((32*a^3*A*b + 16*a*A*b^3 + 8*a^4*B + 24*a^2*b^2*B + 3*b^4*B + 16*a^3*b*C + 12*a*b^3*C)*ArcTanh[Sin[c + d*x]])/(8*d) + ((520*a^2*A*b^2 + 80*A*b^4 + 250*a^3*b*B + 275*a*b^3*B + 24*a^4*C + 332*a^2*b^2*C + 64*b^4*C)*Tan[c + d*x])/(120*d) + ((160*a*A*b^2 + 130*a^2*b*B + 45*b^3*B + 24*a^3*C + 116*a*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(120*d) + ((20*A*b^2 + 35*a*b*B + 12*a^2*C + 16*b^2*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(60*d) + ((5*b*B + 4*a*C)*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(20*d) + (C*(a + b*Sec[c + d*x])^4*Tan[c + d*x])/(5*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, a^3*(4*A*b + a*B)*x + ((48*a^2*A*b^2 + 4*A*b^4 + 32*a^3*b*B + 16*a*b^3*B + 8*a^4*C + 24*a^2*b^2*C + 3*b^4*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (A*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/d - (b*(24*a^3*A - 84*a*A*b^2 - 104*a^2*b*B - 16*b^3*B - 50*a^3*C - 55*a*b^2*C)*Tan[c + d*x])/(24*d) - (b*(24*a^2*A - 12*A*b^2 - 32*a*b*B - 26*a^2*C - 9*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(24*d) - (b*(12*a*A - 4*b*B - 7*a*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) - (b*(4*A - C)*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, (1/2)*a^2*(a^2*A + 12*A*b^2 + 8*a*b*B + 2*a^2*C)*x + (b*(8*a*A*b^2 + 12*a^2*b*B + b^3*B + 8*a^3*C + 4*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((2*A*b + a*B)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/d + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(2*d) - (b*(21*a^2*A*b - 6*A*b^3 + 6*a^3*B - 21*a*b^2*B - 26*a^2*b*C - 4*b^3*C)*Tan[c + d*x])/(6*d) - (b*(18*a*A*b + 6*a^2*B - 3*b^2*B - 8*a*b*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) - (b*(15*A*b + 6*a*B - 2*b*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(6*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, (1/2)*a*(4*a^2*A*b + 8*A*b^3 + a^3*B + 12*a*b^2*B + 8*a^2*b*C)*x + (b^2*(2*A*b^2 + 8*a*b*B + 12*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + ((4*a^2*A + 12*A*b^2 + 15*a*b*B + 6*a^2*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(6*d) + ((4*A*b + 3*a*B)*Cos[c + d*x]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(6*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(3*d) - (b*(4*a^3*A + 26*a*A*b^2 + 21*a^2*b*B - 6*b^3*B + 6*a^3*C - 21*a*b^2*C)*Tan[c + d*x])/(6*d) - (b*(4*a^2*A + 18*A*b^2 + 18*a*b*B + 6*a^2*C - 3*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, (1/8)*(3*a^4*A + 24*a^2*A*b^2 + 8*A*b^4 + 16*a^3*b*B + 32*a*b^3*B + 4*a^4*C + 48*a^2*b^2*C)*x + (b^3*(b*B + 4*a*C)*ArcTanh[Sin[c + d*x]])/d + ((23*a^2*A*b + 12*A*b^3 + 8*a^3*B + 36*a*b^2*B + 36*a^2*b*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(12*d) + ((3*a^2*A + 4*A*b^2 + 8*a*b*B + 4*a^2*C)*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(8*d) + ((A*b + a*B)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(4*d) - (b*(55*a^2*A*b + 50*A*b^3 + 16*a^3*B + 104*a*b^2*B + 84*a^2*b*C - 24*b^3*C)*Tan[c + d*x])/(24*d)}
{Cos[c + d*x]^5*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, (1/8)*(12*a^3*A*b + 16*a*A*b^3 + 3*a^4*B + 24*a^2*b^2*B + 8*b^4*B + 16*a^3*b*C + 32*a*b^3*C)*x + (b^4*C*ArcTanh[Sin[c + d*x]])/d + (1/(120*d))*((64*a^4*A + 332*a^2*A*b^2 + 24*A*b^4 + 275*a^3*b*B + 250*a*b^3*B + 80*a^4*C + 520*a^2*b^2*C)*Sin[c + d*x]) + (1/(120*d))*((116*a^2*A*b + 24*A*b^3 + 45*a^3*B + 130*a*b^2*B + 160*a^2*b*C)*(b + a*Cos[c + d*x])*Sin[c + d*x]) + ((16*a^2*A + 12*A*b^2 + 35*a*b*B + 20*a^2*C)*(b + a*Cos[c + d*x])^2*Sin[c + d*x])/(60*d) + ((4*A*b + 5*a*B)*(b + a*Cos[c + d*x])^3*Sin[c + d*x])/(20*d) + (A*(b + a*Cos[c + d*x])^4*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^6*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 7, (1/16)*(5*a^4*A + 36*a^2*A*b^2 + 8*A*b^4 + 24*a^3*b*B + 32*a*b^3*B + 6*a^4*C + 48*a^2*b^2*C + 16*b^4*C)*x + (1/(15*d))*((32*a^3*A*b + 40*a*A*b^3 + 8*a^4*B + 60*a^2*b^2*B + 15*b^4*B + 40*a^3*b*C + 60*a*b^3*C)*Sin[c + d*x]) + (1/(240*d))*((75*a^4*A + 334*a^2*A*b^2 + 8*A*b^4 + 296*a^3*b*B + 192*a*b^3*B + 90*a^4*C + 460*a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x]) + (1/(60*d))*((39*a^2*A*b + 4*A*b^3 + 16*a^3*B + 36*a*b^2*B + 50*a^2*b*C)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])*Sin[c + d*x]) + (1/(120*d))*((25*a^2*A + 12*A*b^2 + 48*a*b*B + 30*a^2*C)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^2*Sin[c + d*x]) + ((2*A*b + 3*a*B)*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(15*d) + (A*Cos[c + d*x]^5*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(6*d)}
{Cos[c + d*x]^7*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 8, (1/16)*(20*a^3*A*b + 24*a*A*b^3 + 5*a^4*B + 36*a^2*b^2*B + 8*b^4*B + 24*a^3*b*C + 32*a*b^3*C)*x + ((48*a^4*A + 336*a^2*A*b^2 + 70*A*b^4 + 224*a^3*b*B + 280*a*b^3*B + 56*a^4*C + 420*a^2*b^2*C + 105*b^4*C)*Sin[c + d*x])/(105*d) + ((20*a^3*A*b + 24*a*A*b^3 + 5*a^4*B + 36*a^2*b^2*B + 8*b^4*B + 24*a^3*b*C + 32*a*b^3*C)*Cos[c + d*x]*Sin[c + d*x])/(16*d) + ((192*a^4*A + 788*a^2*A*b^2 + 8*A*b^4 + 721*a^3*b*B + 392*a*b^3*B + 224*a^4*C + 1008*a^2*b^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(840*d) + ((412*a^2*A*b + 24*A*b^3 + 175*a^3*B + 336*a*b^2*B + 504*a^2*b*C)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])*Sin[c + d*x])/(840*d) + ((12*a^2*A + 4*A*b^2 + 21*a*b*B + 14*a^2*C)*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(70*d) + ((4*A*b + 7*a*B)*Cos[c + d*x]^5*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(42*d) + (A*Cos[c + d*x]^6*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(7*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 7, -(((2*a*A*b^2 - 2*a^2*b*B - b^3*B + 2*a^3*C + a*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^4*d)) - (2*a^2*(A*b^2 - a*b*B + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*Sqrt[a^2 - b^2]*d) + ((3*A*b^2 - 3*a*b*B + 3*a^2*C + 2*b^2*C)*Tan[c + d*x])/(3*b^3*d) + ((b*B - a*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*d) + (C*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 6, ((2*A*b^2 - 2*a*b*B + 2*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^3*d) + (2*a*(A*b^2 - a*b*B + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*Sqrt[a^2 - b^2]*d) + ((b*B - a*C)*Tan[c + d*x])/(b^2*d) + (C*Sec[c + d*x]*Tan[c + d*x])/(2*b*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 5, ((b*B - a*C)*ArcTanh[Sin[c + d*x]])/(b^2*d) - (2*(A*b^2 - a*b*B + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*Sqrt[a^2 - b^2]*d) + (C*Tan[c + d*x])/(b*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 4, (A*x)/a + (C*ArcTanh[Sin[c + d*x]])/(b*d) + (2*(A*b^2 - a*b*B + a^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*b*Sqrt[a^2 - b^2]*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 4, -(((A*b - a*B)*x)/a^2) - (2*(A*b^2 - a*b*B + a^2*C)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^2*Sqrt[a^2 - b^2]*d) + (A*Sin[c + d*x])/(a*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 5, ((a^2*A + 2*A*b^2 - 2*a*b*B + 2*a^2*C)*x)/(2*a^3) + (2*b*(A*b^2 - a*b*B + a^2*C)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^3*Sqrt[a^2 - b^2]*d) - ((A*b - a*B)*Sin[c + d*x])/(a^2*d) + (A*Cos[c + d*x]*Sin[c + d*x])/(2*a*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 6, -((a^2*A*b + 2*A*b^3 - a^3*B - 2*a*b^2*B + 2*a^2*b*C)*x)/(2*a^4) - (2*b^2*(A*b^2 - a*b*B + a^2*C)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^4*Sqrt[a^2 - b^2]*d) + ((2*a^2*A + 3*A*b^2 - 3*a*b*B + 3*a^2*C)*Sin[c + d*x])/(3*a^3*d) - ((A*b - a*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*d) + (A*Cos[c + d*x]^2*Sin[c + d*x])/(3*a*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 7, ((3*a^4*A + 4*a^2*A*b^2 + 8*A*b^4 - 4*a^3*b*B - 8*a*b^3*B + 4*a^4*C + 8*a^2*b^2*C)*x)/(8*a^5) + (2*b^3*(A*b^2 - a*b*B + a^2*C)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^5*Sqrt[a^2 - b^2]*d) - ((2*a^2*A*b + 3*A*b^3 - 2*a^3*B - 3*a*b^2*B + 3*a^2*b*C)*Sin[c + d*x])/(3*a^4*d) + ((3*a^2*A + 4*A*b^2 - 4*a*b*B + 4*a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(8*a^3*d) - ((A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])/(3*a^2*d) + (A*Cos[c + d*x]^3*Sin[c + d*x])/(4*a*d)}


{Sec[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 8, -(((4*a*A*b^2 - 6*a^2*b*B - b^3*B + 8*a^3*C + 2*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^5*d)) - (2*a^2*(2*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 4*a*b^3*B + 4*a^4*C - 5*a^2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(3/2)*d) + ((6*a^2*A*b^2 - 3*A*b^4 - 9*a^3*b*B + 6*a*b^3*B + 12*a^4*C - 7*a^2*b^2*C - 2*b^4*C)*Tan[c + d*x])/(3*b^4*(a^2 - b^2)*d) - ((2*a*A*b^2 - 3*a^2*b*B + b^3*B + 4*a^3*C - 2*a*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^3*(a^2 - b^2)*d) + ((3*A*b^2 - 3*a*b*B + 4*a^2*C - b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(3*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^3*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 7, ((2*A*b^2 - 4*a*b*B + 6*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^4*d) + (2*a*(a^2*A*b^2 - 2*A*b^4 - 2*a^3*b*B + 3*a*b^3*B + 3*a^4*C - 4*a^2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(3/2)*d) - ((a*A*b^2 - 2*a^2*b*B + b^3*B + 3*a^3*C - 2*a*b^2*C)*Tan[c + d*x])/(b^3*(a^2 - b^2)*d) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 6, ((b*B - 2*a*C)*ArcTanh[Sin[c + d*x]])/(b^3*d) + (2*(A*b^4 + a^3*b*B - 2*a*b^3*B - 2*a^4*C + 3*a^2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(3/2)*d) + ((A*b^2 - a*b*B + 2*a^2*C - b^2*C)*Tan[c + d*x])/(b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 5, (C*ArcTanh[Sin[c + d*x]])/(b^2*d) - (2*(a*A*b^2 - b^3*B - a^3*C + 2*a*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^2*(a^2 - b^2)^(3/2)*d) - ((A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 3, (A*x)/a^2 + (2*(2*a^2*A*b - A*b^3 - a^3*B + a^2*b*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d) + ((A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 5, -(((2*A*b - a*B)*x)/a^3) - (2*(3*a^2*A*b^2 - 2*A*b^4 - 2*a^3*b*B + a*b^3*B + a^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(3/2)*d) + ((a^2*A - 2*A*b^2 + a*b*B - a^2*C)*Sin[c + d*x])/(a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 6, ((a^2*A + 6*A*b^2 - 4*a*b*B + 2*a^2*C)*x)/(2*a^4) + (2*b*(4*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 2*a*b^3*B + 2*a^4*C - a^2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(3/2)*d) - ((2*a^2*A*b - 3*A*b^3 - a^3*B + 2*a*b^2*B - a^2*b*C)*Sin[c + d*x])/(a^3*(a^2 - b^2)*d) + ((a^2*A - 3*A*b^2 + 2*a*b*B - 2*a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 7, -(((2*a^2*A*b + 8*A*b^3 - a^3*B - 6*a*b^2*B + 4*a^2*b*C)*x)/(2*a^5)) - (2*b^2*(5*a^2*A*b^2 - 4*A*b^4 - 4*a^3*b*B + 3*a*b^3*B + 3*a^4*C - 2*a^2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(3/2)*d) + ((2*a^4*A + 7*a^2*A*b^2 - 12*A*b^4 - 6*a^3*b*B + 9*a*b^3*B + 3*a^4*C - 6*a^2*b^2*C)*Sin[c + d*x])/(3*a^4*(a^2 - b^2)*d) - ((2*a^2*A*b - 4*A*b^3 - a^3*B + 3*a*b^2*B - 2*a^2*b*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^3*(a^2 - b^2)*d) + ((a^2*A - 4*A*b^2 + 3*a*b*B - 3*a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^2*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 8, ((2*A*b^2 - 6*a*b*B + 12*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*b^5*d) + (a*(2*a^4*A*b^2 - 5*a^2*A*b^4 + 6*A*b^6 - 6*a^5*b*B + 15*a^3*b^3*B - 12*a*b^5*B + 12*a^6*C - 29*a^4*b^2*C + 20*a^2*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(5/2)*d) - ((2*a^3*A*b^2 - 5*a*A*b^4 - 6*a^4*b*B + 11*a^2*b^3*B - 2*b^5*B + 12*a^5*C - 21*a^3*b^2*C + 6*a*b^4*C)*Tan[c + d*x])/(2*b^4*(a^2 - b^2)^2*d) + ((a^2*A*b^2 - 4*A*b^4 - 3*a^3*b*B + 6*a*b^3*B + 6*a^4*C - 10*a^2*b^2*C + b^4*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^3*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((3*A*b^4 + 2*a^3*b*B - 5*a*b^3*B - 4*a^4*C + 7*a^2*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 7, ((b*B - 3*a*C)*ArcTanh[Sin[c + d*x]])/(b^4*d) - ((a^2*A*b^4 + 2*A*b^6 - 2*a^5*b*B + 5*a^3*b^3*B - 6*a*b^5*B + 6*a^6*C - 15*a^4*b^2*C + 12*a^2*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(5/2)*d) - ((3*A*b^4 + 2*a^3*b*B - 5*a*b^3*B - 6*a^4*C + 11*a^2*b^2*C - 2*b^4*C)*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((a^2*A*b^2 + 2*A*b^4 + a^3*b*B - 4*a*b^3*B - 3*a^4*C + 6*a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 6, (C*ArcTanh[Sin[c + d*x]])/(b^3*d) + ((3*a*A*b^4 - a^2*b^3*B - 2*b^5*B + 2*a^5*C - 5*a^3*b^2*C + 6*a*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^3*(a^2 - b^2)^(5/2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((2*a^2*A*b^2 + A*b^4 - 3*a*b^3*B - 2*a^4*C + 5*a^2*b^2*C)*Tan[c + d*x])/(2*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 5, -(((2*a^2*A + A*b^2 - 3*a*b*B + a^2*C + 2*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(5/2)*d)) - ((A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - ((3*a*A*b^2 - a^2*b*B - 2*b^3*B - a^3*C + 4*a*b^2*C)*Tan[c + d*x])/(2*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 4, (A*x)/a^3 + ((6*a^4*A*b - 5*a^2*A*b^3 + 2*A*b^5 - 2*a^5*B - a^3*b^2*B + 3*a^4*b*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d) + ((A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((5*a^2*A*b^2 - 2*A*b^4 - 3*a^3*b*B + a^4*C + 2*a^2*b^2*C)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 6, -(((3*A*b - a*B)*x)/a^4) - ((12*a^4*A*b^2 - 15*a^2*A*b^4 + 6*A*b^6 - 6*a^5*b*B + 5*a^3*b^3*B - 2*a*b^5*B + 2*a^6*C + a^4*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(5/2)*d) + ((2*a^4*A - 11*a^2*A*b^2 + 6*A*b^4 + 5*a^3*b*B - 2*a*b^3*B - 3*a^4*C)*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((6*a^2*A*b^2 - 3*A*b^4 - 4*a^3*b*B + a*b^3*B + 2*a^4*C + a^2*b^2*C)*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 7, ((a^2*A + 12*A*b^2 - 6*a*b*B + 2*a^2*C)*x)/(2*a^5) + (b*(20*a^4*A*b^2 - 29*a^2*A*b^4 + 12*A*b^6 - 12*a^5*b*B + 15*a^3*b^3*B - 6*a*b^5*B + 6*a^6*C - 5*a^4*b^2*C + 2*a^2*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(5/2)*d) - ((6*a^4*A*b - 21*a^2*A*b^3 + 12*A*b^5 - 2*a^5*B + 11*a^3*b^2*B - 6*a*b^4*B - 5*a^4*b*C + 2*a^2*b^3*C)*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^2*d) + ((a^4*A - 10*a^2*A*b^2 + 6*A*b^4 + 6*a^3*b*B - 3*a*b^3*B - 4*a^4*C + a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((7*a^2*A*b^2 - 4*A*b^4 - 5*a^3*b*B + 2*a*b^3*B + 3*a^4*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 8, ((b*B - 4*a*C)*ArcTanh[Sin[c + d*x]])/(b^5*d) + ((3*a^2*A*b^6 + 2*A*b^8 + 2*a^7*b*B - 7*a^5*b^3*B + 8*a^3*b^5*B - 8*a*b^7*B - 8*a^8*C + 28*a^6*b^2*C - 35*a^4*b^4*C + 20*a^2*b^6*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^5*(a^2 - b^2)^(7/2)*d) + ((4*a^2*A*b^4 + 11*A*b^6 - 6*a^5*b*B + 17*a^3*b^3*B - 26*a*b^5*B + 24*a^6*C - 68*a^4*b^2*C + 65*a^2*b^4*C - 6*b^6*C)*Tan[c + d*x])/(6*b^4*(a^2 - b^2)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^3*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((2*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 6*a*b^3*B - 4*a^4*C + 9*a^2*b^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - ((3*a^2*A*b^4 + 2*A*b^6 - a^5*b*B + 2*a^3*b^3*B - 6*a*b^5*B + 4*a^6*C - 11*a^4*b^2*C + 12*a^2*b^4*C)*Sec[c + d*x]*Tan[c + d*x])/(2*b^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 7, (C*ArcTanh[Sin[c + d*x]])/(b^4*d) - ((a^3*A*b^4 + 4*a*A*b^6 - 3*a^2*b^5*B - 2*b^7*B - 2*a^7*C + 7*a^5*b^2*C - 8*a^3*b^4*C + 8*a*b^6*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(b^4*(a^2 - b^2)^(7/2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((3*a^2*A*b^2 + 2*A*b^4 - 5*a*b^3*B - 3*a^4*C + 8*a^2*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - ((13*a^2*A*b^4 + 2*A*b^6 - 4*a^3*b^3*B - 11*a*b^5*B + 6*a^6*C - 17*a^4*b^2*C + 26*a^2*b^4*C)*Tan[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 6, ((4*a^2*A*b + A*b^3 - a^3*B - 4*a*b^2*B + 3*a^2*b*C + 2*b^3*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((4*a^2*A*b^2 + A*b^4 - a^3*b*B - 4*a*b^3*B - 2*a^4*C + 7*a^2*b^2*C)*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((2*a^3*A*b^2 + 13*a*A*b^4 + a^4*b*B - 10*a^2*b^3*B - 6*b^5*B + 2*a^5*C - 5*a^3*b^2*C + 18*a*b^4*C)*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 6, -(((2*a^3*A + 3*a*A*b^2 - 4*a^2*b*B - b^3*B + a^3*C + 4*a*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/((a^2 - b^2)^(7/2)*d)) - ((A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - ((5*a*A*b^2 - 2*a^2*b*B - 3*b^3*B - a^3*C + 6*a*b^2*C)*Tan[c + d*x])/(6*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) - ((11*a^2*A*b^2 + 4*A*b^4 - 2*a^3*b*B - 13*a*b^3*B - a^4*C + 10*a^2*b^2*C + 6*b^4*C)*Tan[c + d*x])/(6*b*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 5, (A*x)/a^4 + ((8*a^6*A*b - 8*a^4*A*b^3 + 7*a^2*A*b^5 - 2*A*b^7 - 2*a^7*B - 3*a^5*b^2*B + 4*a^6*b*C + a^4*b^3*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(7/2)*d) + ((A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((8*a^2*A*b^2 - 3*A*b^4 - 5*a^3*b*B + 2*a^4*C + 3*a^2*b^2*C)*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((26*a^4*A*b^2 - 17*a^2*A*b^4 + 6*A*b^6 - 11*a^5*b*B - 4*a^3*b^3*B + 2*a^6*C + 13*a^4*b^2*C)*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 7, -(((4*A*b - a*B)*x)/a^5) - ((20*a^6*A*b^2 - 35*a^4*A*b^4 + 28*a^2*A*b^6 - 8*A*b^8 - 8*a^7*b*B + 8*a^5*b^3*B - 7*a^3*b^5*B + 2*a*b^7*B + 2*a^8*C + 3*a^6*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^5*(a^2 - b^2)^(7/2)*d) + ((6*a^6*A - 65*a^4*A*b^2 + 68*a^2*A*b^4 - 24*A*b^6 + 26*a^5*b*B - 17*a^3*b^3*B + 6*a*b^5*B - 11*a^6*C - 4*a^4*b^2*C)*Sin[c + d*x])/(6*a^4*(a^2 - b^2)^3*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((9*a^2*A*b^2 - 4*A*b^4 - 6*a^3*b*B + a*b^3*B + 3*a^4*C + 2*a^2*b^2*C)*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((12*a^4*A*b^2 - 11*a^2*A*b^4 + 4*A*b^6 - 6*a^5*b*B + 2*a^3*b^3*B - a*b^5*B + 2*a^6*C + 3*a^4*b^2*C)*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 8, ((a^2*A + 20*A*b^2 - 8*a*b*B + 2*a^2*C)*x)/(2*a^6) + (b*(40*a^6*A*b^2 - 84*a^4*A*b^4 + 69*a^2*A*b^6 - 20*A*b^8 - 20*a^7*b*B + 35*a^5*b^3*B - 28*a^3*b^5*B + 8*a*b^7*B + 8*a^8*C - 8*a^6*b^2*C + 7*a^4*b^4*C - 2*a^2*b^6*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^6*(a^2 - b^2)^(7/2)*d) - ((24*a^6*A*b - 146*a^4*A*b^3 + 167*a^2*A*b^5 - 60*A*b^7 - 6*a^7*B + 65*a^5*b^2*B - 68*a^3*b^4*B + 24*a*b^6*B - 26*a^6*b*C + 17*a^4*b^3*C - 6*a^2*b^5*C)*Sin[c + d*x])/(6*a^5*(a^2 - b^2)^3*d) + ((a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A*b^6 + 12*a^5*b*B - 11*a^3*b^3*B + 4*a*b^5*B - 6*a^6*C + 2*a^4*b^2*C - a^2*b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^3*d) + ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((10*a^2*A*b^2 - 5*A*b^4 - 7*a^3*b*B + 2*a*b^3*B + 4*a^4*C + a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + ((48*a^4*A*b^2 - 53*a^2*A*b^4 + 20*A*b^6 - 27*a^5*b*B + 20*a^3*b^3*B - 8*a*b^5*B + 12*a^6*C + a^4*b^2*C + 2*a^2*b^4*C)*Cos[c + d*x]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}


{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 6, a^4*(b*B - a*C)*x + (b*(32*a^3*b*B + 16*a*b^3*B - 24*a^4*C + 8*a^2*b^2*C + 3*b^4*C)*ArcTanh[Sin[c + d*x]])/(8*d) + (b^2*(104*a^2*b*B + 16*b^3*B - 54*a^3*C + 39*a*b^2*C)*Tan[c + d*x])/(24*d) + (b^2*(32*a*b*B - 6*a^2*C + 9*b^2*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(24*d) + (b^2*(4*b*B + 3*a*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (b^2*C*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 5, a^3*(b*B - a*C)*x + (b*(6*a^2*b*B + b^3*B - 4*a^3*C + 2*a*b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (b^2*(15*a*b*B - 4*a^2*C + 4*b^2*C)*Tan[c + d*x])/(6*d) + (b^2*(3*b*B + 2*a*C)*(a + b*Sec[c + d*x])*Tan[c + d*x])/(6*d) + (b^2*C*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d)}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 4, a^2*(b*B - a*C)*x + (b*(4*a*b*B - 2*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/(2*d) + (b^2*(2*b*B + a*C)*Tan[c + d*x])/(2*d) + (b^2*C*(a + b*Sec[c + d*x])*Tan[c + d*x])/(2*d)}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 3, (b*B - a*C)*x + (b*C*ArcTanh[Sin[c + d*x]])/d}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 3, ((b*B - a*C)*x)/a + (2*b*(b*B - 2*a*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a*Sqrt[a^2 - b^2]*d)}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 4, ((b*B - a*C)*x)/a^2 + (2*b*(2*a^2*b*B - b^3*B - 3*a^3*C + a*b^2*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^2*(a^2 - b^2)^(3/2)*d) + (b^2*(b*B - 2*a*C)*Tan[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^4, x, 5, ((b*B - a*C)*x)/a^3 + (b*(6*a^4*b*B - 5*a^2*b^3*B + 2*b^5*B - 8*a^5*C + 4*a^3*b^2*C - 2*a*b^4*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^3*(a^2 - b^2)^(5/2)*d) + (b^2*(b*B - 2*a*C)*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b^2*(5*a^2*b*B - 2*b^3*B - 8*a^3*C + 2*a*b^2*C)*Tan[c + d*x])/(2*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^5, x, 6, ((b*B - a*C)*x)/a^4 + (b*(8*a^6*b*B - 8*a^4*b^3*B + 7*a^2*b^5*B - 2*b^7*B - 10*a^7*C + 5*a^5*b^2*C - 7*a^3*b^4*C + 2*a*b^6*C)*ArcTanh[((-a + b)*Tan[(1/2)*(c + d*x)])/Sqrt[a^2 - b^2]])/(a^4*(a^2 - b^2)^(7/2)*d) + (b^2*(b*B - 2*a*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (b^2*(8*a^2*b*B - 3*b^3*B - 13*a^3*C + 3*a*b^2*C)*Tan[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (b^2*(26*a^4*b*B - 17*a^2*b^3*B + 6*b^5*B - 37*a^5*C + 13*a^3*b^2*C - 6*a*b^4*C)*Tan[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*(a + b*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^m (A+B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 9, (2*(a + b)*(42*a^2*A*b^2 - 189*A*b^4 - 24*a^3*b*B - 57*a*b^3*B + 16*a^4*C + 24*a^2*b^2*C - 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(42*a^2*A*b^2 - 147*a*A*b^3 - 189*A*b^4 - 24*a^3*b*B - 6*a^2*b^2*B - 57*a*b^3*B - 75*b^4*B + 16*a^4*C + 4*a^3*b*C + 24*a^2*b^2*C - 111*a*b^3*C - 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(42*a^2*A*b^2 - 189*A*b^4 - 24*a^3*b*B - 57*a*b^3*B + 16*a^4*C + 24*a^2*b^2*C - 147*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(315*b^4*d) + (2*(21*a*A*b^2 - 12*a^2*b*B + 75*b^3*B + 8*a^3*C + 13*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^3*d) + (2*(63*A*b^2 + 9*a*b*B - 6*a^2*C + 49*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^2*d) + (2*(9*b*B + a*C)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(63*b*d) + (2*C*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 8, (-2*(a + b)*(35*a*A*b^2 - 14*a^2*b*B + 63*b^3*B + 8*a^3*C + 19*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(35*a*A*b^2 + 35*A*b^3 - 14*a^2*b*B + 49*a*b^2*B + 63*b^3*B + 8*a^3*C + 2*a^2*b*C + 19*a*b^2*C + 25*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(35*a*A*b^2 - 14*a^2*b*B + 63*b^3*B + 8*a^3*C + 19*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(105*b^3*d) + (2*(35*A*b^2 + 7*a*b*B - 4*a^2*C + 25*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b^2*d) + (2*(7*b*B + a*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*b*d) + (2*C*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 7, (-2*(a + b)*(15*A*b^2 + 5*a*b*B - 2*a^2*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(15*a*A*b + 15*A*b^2 + 5*a*b*B + 5*b^2*B - 2*a^2*C + 7*a*b*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(15*A*b^2 + 5*a*b*B - 2*a^2*C + 9*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(15*b^2*d) + (2*(5*b*B + a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*b*d) + (2*C*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 8, -((2*(a + b)*(3*b*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(3*a*A - 3*A*b - 3*a*B - 3*b*B - a*C - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*b*B + a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b*d) + (2*C*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 8, ((a + b)*(A - 2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b + a*B - b*B - a*C - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b + 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d - ((A - 2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 8, ((a + b)*(A*b + 4*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a*A - A*b + 4*b*B + 4*a*C - 4*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A - A*b^2 + 4*a*b*B + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d) + ((A*b + 4*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 9, ((a + b)*(16*a^2*A - 3*A*b^2 + 6*a*b*B + 24*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((14*a*A*b - A*b^2 + 12*a^2*B - 6*a*b*B + 24*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A*b + A*b^3 + 8*a^3*B - 2*a*b^2*B + 8*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((A*b + 6*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*a*d) + (A*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d) + ((16*a^2*A - 3*A*b^2 + 6*a*b*B + 24*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a^2*d)}


{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 10, (2*(a + b)*(198*a^3*A*b^2 - 2706*a*A*b^4 - 88*a^4*b*B - 363*a^2*b^3*B - 1617*b^5*B + 48*a^5*C + 108*a^3*b^2*C - 2088*a*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3465*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(198*a^3*A*b^2 - 1683*a^2*A*b^3 - 2706*a*A*b^4 - 825*A*b^5 - 88*a^4*b*B - 22*a^3*b^2*B - 363*a^2*b^3*B - 2046*a*b^4*B - 1617*b^5*B + 48*a^5*C + 12*a^4*b*C + 108*a^3*b^2*C - 1269*a^2*b^3*C - 2088*a*b^4*C - 675*b^5*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3465*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(198*a^3*A*b^2 - 2706*a*A*b^4 - 88*a^4*b*B - 363*a^2*b^3*B - 1617*b^5*B + 48*a^5*C + 108*a^3*b^2*C - 2088*a*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3465*b^4*d) + (2*(99*a^2*A*b^2 + 825*A*b^4 - 44*a^3*b*B + 968*a*b^3*B + 24*a^4*C + 57*a^2*b^2*C + 675*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3465*b^3*d) + (2*(792*a*A*b^2 + 33*a^2*b*B + 539*b^3*B - 18*a^3*C + 606*a*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3465*b^2*d) + (2*(99*A*b^2 + 110*a*b*B + 3*a^2*C + 81*b^2*C)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(693*b*d) + (2*(11*b*B + 3*a*C)*Sec[c + d*x]^3*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(99*d) + (2*C*Sec[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(11*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, (-2*(a + b)*(63*a^2*A*b^2 + 189*A*b^4 - 18*a^3*b*B + 246*a*b^3*B + 8*a^4*C + 33*a^2*b^2*C + 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(63*a^2*A*b^2 + 252*a*A*b^3 + 189*A*b^4 - 18*a^3*b*B + 153*a^2*b^2*B + 246*a*b^3*B + 75*b^4*B + 8*a^4*C + 2*a^3*b*C + 33*a^2*b^2*C + 186*a*b^3*C + 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(63*a^2*A*b^2 + 189*A*b^4 - 18*a^3*b*B + 246*a*b^3*B + 8*a^4*C + 33*a^2*b^2*C + 147*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(315*b^3*d) + (2*(126*a*A*b^2 + 9*a^2*b*B + 75*b^3*B - 4*a^3*C + 88*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b^2*d) + (2*(63*A*b^2 + 72*a*b*B + 3*a^2*C + 49*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b*d) + (2*(3*b*B + a*C)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(21*d) + (2*C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 8, (-2*(a + b)*(140*a*A*b^2 + 21*a^2*b*B + 63*b^3*B - 6*a^3*C + 82*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(105*a^2*A*b + 140*a*A*b^2 + 35*A*b^3 + 21*a^2*b*B + 84*a*b^2*B + 63*b^3*B - 6*a^3*C + 51*a^2*b*C + 82*a*b^2*C + 25*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(140*a*A*b^2 + 21*a^2*b*B + 63*b^3*B - 6*a^3*C + 82*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(105*b^2*d) + (2*(35*A*b^2 + 42*a*b*B + 3*a^2*C + 25*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b*d) + (2*(7*b*B + 3*a*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*d) + (2*C*Sec[c + d*x]*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(7*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, -((2*(a + b)*(15*A*b^2 + 20*a*b*B + 3*a^2*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(15*a^2*A - 30*a*A*b - 15*A*b^2 - 15*a^2*B - 20*a*b*B - 5*b^2*B - 3*a^2*C - 12*a*b*C - 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^2*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(15*A*b^2 + 20*a*b*B + 3*a^2*C + 9*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*b*d) + (2*(5*b*B + 3*a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*d) + (2*C*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, ((a + b)*(3*a*A - 6*b*B - 8*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(6*a*A*b - 3*A*b^2 + 3*a^2*B - 6*a*b*B - 3*b^2*B - 3*a^2*C - 4*a*b*C - b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*(3*A*b + 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/d - ((3*a*A - 6*b*B - 8*a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d) - (b*(3*A - 2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, ((a + b)*(5*A*b + 4*a*B - 8*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a^2*A - a*A*b + 4*A*b^2 + 8*a*b*B - 4*b^2*B + 4*a^2*C - 8*a*b*C - 4*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 3*A*b^2 + 12*a*b*B + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((3*A*b + 4*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(2*d) - ((5*A*b + 4*a*B - 8*b*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, ((a + b)*(16*a^2*A + 3*A*b^2 + 30*a*b*B + 24*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((26*a*A*b - 7*A*b^2 + 12*a^2*B - 6*a*b*B + 24*b^2*B + 48*a*b*C - 24*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((12*a^2*A*b - A*b^3 + 8*a^3*B + 6*a*b^2*B + 24*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((A*b + 2*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + ((16*a^2*A + 3*A*b^2 + 30*a*b*B + 24*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 10, ((a + b)*(156*a^2*A*b - 9*A*b^3 + 128*a^3*B + 24*a*b^2*B + 240*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(192*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((72*a^3*A - 36*a^2*A*b + 114*a*A*b^2 - 3*A*b^3 + 208*a^2*b*B - 56*a*b^2*B + 96*a^3*C - 48*a^2*b*C + 192*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(96*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^4*A + 24*a^2*A*b^2 + 3*A*b^4 + 96*a^3*b*B - 8*a*b^3*B + 64*a^4*C + 48*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(32*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((36*a^2*A + 3*A*b^2 + 56*a*b*B + 48*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(96*a*d) + ((3*A*b + 8*a*B)*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(4*d) + ((156*a^2*A*b - 9*A*b^3 + 128*a^3*B + 24*a*b^2*B + 240*a^2*b*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*a^2*d)}


{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, (-2*(a + b)*(495*a^3*A*b^2 + 4785*a*A*b^4 - 110*a^4*b*B + 3069*a^2*b^3*B + 1617*b^5*B + 40*a^5*C + 255*a^3*b^2*C + 3705*a*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3465*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(495*a^3*A*b^2 + 4455*a^2*A*b^3 + 4785*a*A*b^4 + 825*A*b^5 - 110*a^4*b*B + 1705*a^3*b^2*B + 3069*a^2*b^3*B + 2871*a*b^4*B + 1617*b^5*B + 40*a^5*C + 10*a^4*b*C + 255*a^3*b^2*C + 3315*a^2*b^3*C + 3705*a*b^4*C + 675*b^5*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3465*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(495*a^3*A*b^2 + 4785*a*A*b^4 - 110*a^4*b*B + 3069*a^2*b^3*B + 1617*b^5*B + 40*a^5*C + 255*a^3*b^2*C + 3705*a*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3465*b^3*d) + (2*(1485*a^2*A*b^2 + 825*A*b^4 + 55*a^3*b*B + 1793*a*b^3*B - 20*a^4*C + 1025*a^2*b^2*C + 675*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3465*b^2*d) + (2*(1485*a*A*b^2 + 825*a^2*b*B + 539*b^3*B + 15*a^3*C + 1145*a*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3465*b*d) + (2*(33*A*b^2 + 44*a*b*B + 5*a^2*C + 27*b^2*C)*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(231*d) + (2*(11*b*B + 5*a*C)*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(99*d) + (2*C*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^(5/2)*Tan[c + d*x])/(11*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 9, (-2*(a + b)*(483*a^2*A*b^2 + 189*A*b^4 + 45*a^3*b*B + 435*a*b^3*B - 10*a^4*C + 279*a^2*b^2*C + 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(315*a^3*A*b + 483*a^2*A*b^2 + 357*a*A*b^3 + 189*A*b^4 + 45*a^3*b*B + 405*a^2*b^2*B + 435*a*b^3*B + 75*b^4*B - 10*a^4*C + 155*a^3*b*C + 279*a^2*b^2*C + 261*a*b^3*C + 147*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(315*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(483*a^2*A*b^2 + 189*A*b^4 + 45*a^3*b*B + 435*a*b^3*B - 10*a^4*C + 279*a^2*b^2*C + 147*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(315*b^2*d) + (2*(231*a*A*b^2 + 135*a^2*b*B + 75*b^3*B + 5*a^3*C + 163*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*b*d) + (2*(63*A*b^2 + 90*a*b*B + 15*a^2*C + 49*b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(315*d) + (2*(9*b*B + 5*a*C)*Sec[c + d*x]*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(63*d) + (2*C*Sec[c + d*x]*(a + b*Sec[c + d*x])^(5/2)*Tan[c + d*x])/(9*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, -((2*(a + b)*(245*a*A*b^2 + 161*a^2*b*B + 63*b^3*B + 15*a^3*C + 145*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(105*a^3*A - 315*a^2*A*b - 245*a*A*b^2 - 35*A*b^3 - 105*a^3*B - 161*a^2*b*B - 119*a*b^2*B - 63*b^3*B - 15*a^3*C - 135*a^2*b*C - 145*a*b^2*C - 25*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(105*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^3*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(245*a*A*b^2 + 161*a^2*b*B + 63*b^3*B + 15*a^3*C + 145*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(105*b*d) + (2*(35*A*b^2 + 56*a*b*B + 15*a^2*C + 25*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*d) + (2*(7*b*B + 5*a*C)*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(35*d) + (2*C*(a + b*Sec[c + d*x])^(5/2)*Tan[c + d*x])/(7*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, ((a + b)*(15*a^2*A - 30*A*b^2 - 70*a*b*B - 46*a^2*C - 18*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(45*a^2*A*b - 45*a*A*b^2 - 15*A*b^3 + 15*a^3*B - 45*a^2*b*B - 35*a*b^2*B - 5*b^3*B - 15*a^3*C - 23*a^2*b*C - 17*a*b^2*C - 9*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a^2*(5*A*b + 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/d - ((15*a^2*A - 30*A*b^2 - 70*a*b*B - 46*a^2*C - 18*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d) - (b*(15*a*A - 10*b*B - 16*a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*d) - (b*(5*A - 2*C)*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, ((a + b)*(27*a*A*b + 12*a^2*B - 24*b^2*B - 56*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((6*a^3*A - 3*a^2*A*b + 36*a*A*b^2 - 12*A*b^3 + 36*a^2*b*B - 36*a*b^2*B - 12*b^3*B + 12*a^3*C - 36*a^2*b*C - 28*a*b^2*C - 4*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(6*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (a*(4*a^2*A + 15*A*b^2 + 20*a*b*B + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((5*A*b + 4*a*B)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(4*d) + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(2*d) - ((27*a*A*b + 12*a^2*B - 24*b^2*B - 56*a*b*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(12*d) - (b*(21*A*b + 12*a*B - 8*b*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(12*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, ((a + b)*(16*a^2*A + 33*A*b^2 + 54*a*b*B + 24*a^2*C - 48*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((38*a^2*A*b - 13*a*A*b^2 + 24*A*b^3 + 12*a^3*B - 6*a^2*b*B + 72*a*b^2*B - 24*b^3*B + 72*a^2*b*C - 72*a*b^2*C - 24*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((20*a^2*A*b + 5*A*b^3 + 8*a^3*B + 30*a*b^2*B + 40*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((16*a^2*A + 15*A*b^2 + 42*a*b*B + 24*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + ((5*A*b + 6*a*B)*Cos[c + d*x]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(12*d) + (A*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(3*d) - ((16*a^2*A + 33*A*b^2 + 54*a*b*B + 24*a^2*C - 48*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*d)}
{Cos[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 10, ((a + b)*(284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*B + 432*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(192*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((72*a^3*A - 36*a^2*A*b + 322*a*A*b^2 - 59*A*b^3 + 304*a^2*b*B - 104*a*b^2*B + 192*b^3*B + 96*a^3*C - 48*a^2*b*C + 576*a*b^2*C - 192*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(96*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^4*A + 120*a^2*A*b^2 - 5*A*b^4 + 160*a^3*b*B + 40*a*b^3*B + 64*a^4*C + 240*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(32*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((12*a^2*A + 5*A*b^2 + 24*a*b*B + 16*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(32*d) + ((5*A*b + 8*a*B)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(24*d) + (A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(4*d) + ((284*a^2*A*b + 15*A*b^3 + 128*a^3*B + 264*a*b^2*B + 432*a^2*b*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(192*a*d)}
{Cos[c + d*x]^5*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(5/2), x, 11, ((a + b)*(1024*a^4*A + 1692*a^2*A*b^2 - 45*A*b^4 + 2840*a^3*b*B + 150*a*b^3*B + 1280*a^4*C + 2640*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(1920*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2312*a^3*A*b - 772*a^2*A*b^2 + 1146*a*A*b^3 - 15*A*b^4 + 720*a^4*B - 360*a^3*b*B + 3220*a^2*b^2*B - 590*a*b^3*B + 3040*a^3*b*C - 1040*a^2*b^2*C + 1920*a*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(960*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((240*a^4*A*b + 40*a^2*A*b^3 + 3*A*b^5 + 96*a^5*B + 240*a^3*b^2*B - 10*a*b^4*B + 320*a^4*b*C + 80*a^2*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(64*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((772*a^2*A*b + 15*A*b^3 + 360*a^3*B + 590*a*b^2*B + 1040*a^2*b*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(960*a*d) + ((64*a^2*A + 15*A*b^2 + 110*a*b*B + 80*a^2*C)*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(240*d) + ((A*b + 2*a*B)*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(8*d) + (A*Cos[c + d*x]^4*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(5*d) + ((1024*a^4*A + 1692*a^2*A*b^2 - 45*A*b^4 + 2840*a^3*b*B + 150*a*b^3*B + 1280*a^4*C + 2640*a^2*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(1920*a^2*d)}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 8, (2*(a + b)*(70*a*A*b^2 - 56*a^2*b*B - 63*b^3*B + 48*a^3*C + 44*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(70*a*A*b^2 - 35*A*b^3 - 56*a^2*b*B - 14*a*b^2*B - 63*b^3*B + 48*a^3*C + 12*a^2*b*C + 44*a*b^2*C - 25*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(105*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(70*a*A*b^2 - 56*a^2*b*B - 63*b^3*B + 48*a^3*C + 44*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(105*b^4*d) + (2*(35*A*b^2 - 28*a*b*B + 24*a^2*C + 25*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(105*b^3*d) + (2*(7*b*B - 6*a*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(35*b^2*d) + (2*C*Sec[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(7*b*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 7, (-2*(a + b)*(15*A*b^2 - 10*a*b*B + 8*a^2*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(15*A*b^2 - 10*a*b*B + 5*b^2*B + 8*a^2*C + 2*a*b*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(15*A*b^2 - 10*a*b*B + 8*a^2*C + 9*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(15*b^3*d) + (2*(5*b*B - 4*a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*b^2*d) + (2*C*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*b*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 6, (-2*(a + b)*(3*b*B - 2*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b + 3*b*B - 2*a*C + b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*b*B - 2*a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*b^2*d) + (2*C*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b*d)}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 7, -((2*(a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(A - B - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(b*d)}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 7, (A*(a + b)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(B - C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 8, -(((a + b)*(3*A*b - 4*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((2*a*A - A*b + 4*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 3*A*b^2 - 4*a*b*B + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (A*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*a*d) - ((3*A*b - 4*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a^2*d)}
{Cos[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Sqrt[a + b*Sec[c + d*x]], x, 9, ((a + b)*(16*a^2*A + 15*A*b^2 - 18*a*b*B + 24*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(24*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((2*a*A*b + 5*A*b^2 + 12*a^2*B - 6*a*b*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((4*a^2*A*b + 5*A*b^3 - 8*a^3*B - 6*a*b^2*B + 8*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - ((5*A*b - 6*a*B)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*a^2*d) + (A*Cos[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a*d) + ((16*a^2*A + 15*A*b^2 - 18*a*b*B + 24*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(24*a^3*d)}


{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 8, (-2*(30*a^2*A*b^2 - 15*A*b^4 - 40*a^3*b*B + 25*a*b^3*B + 48*a^4*C - 24*a^2*b^2*C - 9*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*(a - b)*b^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(30*a*A*b^2 - 15*A*b^3 - 40*a^2*b*B + 30*a*b^2*B - 5*b^3*B + 48*a^3*C - 36*a^2*b*C + 12*a*b^2*C - 9*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(15*(a - b)*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(30*a^2*A*b^2 - 15*A*b^4 - 40*a^3*b*B + 25*a*b^3*B + 48*a^4*C - 24*a^2*b^2*C - 9*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(15*b^4*(a^2 - b^2)*d) - (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(15*a*A*b^2 - 20*a^2*b*B + 5*b^3*B + 24*a^3*C - 9*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*b^3*(a^2 - b^2)*d) + (2*(5*A*b^2 - 5*a*b*B + 6*a^2*C - b^2*C)*Sec[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(5*b^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*(3*a*A*b^2 - 6*a^2*b*B + 3*b^3*B + 8*a^3*C - 5*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)*b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*A*b^2 - 6*a*b*B + 3*b^2*B + 8*a^2*C - 6*a*b*C + b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a*A*b^2 - 6*a^2*b*B + 3*b^3*B + 8*a^3*C - 5*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*b^3*(a^2 - b^2)*d) - (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b^2 - 3*a*b*B + 4*a^2*C - b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b^2*(a^2 - b^2)*d)}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 6, (-2*(A*b^2 - a*b*B + 2*a^2*C - b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/((a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b - b*B + 2*a*C - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/((a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + 2*a^2*C - b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(b^2*(a^2 - b^2)*d) - (2*(A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*(a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A - B + C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Tan[(1/2)*(c + d*x)])/(a*b*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 8, ((a^2*A - 3*A*b^2 + 2*a*b*B - 2*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b - a*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*A*b - 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((a^2*A - 3*A*b^2 + 2*a*b*B - 2*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(a^2*(a^2 - b^2)*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 9, -(((7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*B - 8*a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(4*a^3*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((2*a^2*A - 3*a*A*b + 5*A*b^2 - 4*a*b*B + 4*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 15*A*b^2 - 12*a*b*B + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((a^2*A - 5*A*b^2 + 4*a*b*B - 4*a^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*a^2*(a^2 - b^2)*d) - ((7*a^2*A*b - 15*A*b^3 - 4*a^3*B + 12*a*b^2*B - 8*a^2*b*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(4*a^3*(a^2 - b^2)*d)}


{Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 8, -((2*(a + b)*(-2*a^3*A*b^2 + 6*a*A*b^4 + 8*a^4*b*B - 15*a^2*b^3*B + 3*b^5*B - 16*a^5*C + 28*a^3*b^2*C - 8*a*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*b^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (1/(9*b^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]))*(16*((3/8)*b*(a^2*A*b^2 + 3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 4*a^4*C + 7*a^2*b^2*C + b^4*C) + (3/8)*(-2*a^3*A*b^2 + 6*a*A*b^4 + 8*a^4*b*B - 15*a^2*b^3*B + 3*b^5*B - 16*a^5*C + 28*a^3*b^2*C - 8*a*b^4*C))*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))]) + (2*(-2*a^3*A*b^2 + 6*a*A*b^4 + 8*a^4*b*B - 15*a^2*b^3*B + 3*b^5*B - 16*a^5*C + 28*a^3*b^2*C - 8*a*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*b^4*(a^2 - b^2)^2*d) - (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^2*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (4*((-(3/2))*a*b^2*((-a)*A + b*B - a*C) + 2*b^2*(A*b^2 - a*b*B + a^2*C) - (3/2)*a^2*(A*b^2 - a*b*B + 2*a^2*C - b^2*C))*Sec[c + d*x]*Tan[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A*b^2 - 5*A*b^4 - 4*a^3*b*B + 8*a*b^3*B + 8*a^4*C - 13*a^2*b^2*C + b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 7, (2*(a^2*A*b^2 + 3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 8*a^4*C + 15*a^2*b^2*C - 3*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a*A*b^2 + 3*A*b^3 + 2*a^2*b*B - 3*a*b^2*B - 3*b^3*B - 8*a^3*C + 6*a^2*b*C + 9*a*b^2*C - 3*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(a^2*A*b^2 + 3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 8*a^4*C + 15*a^2*b^2*C - 3*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(c + d*x)/2])/(3*b^3*(a^2 - b^2)^2*d) - (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(2*a^2*A*b^2 + 2*A*b^4 + a^3*b*B - 5*a*b^3*B - 4*a^4*C + 8*a^2*b^2*C)*Tan[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{Sec[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 6, (-2*(4*a*A*b^2 - a^2*b*B - 3*b^3*B - 2*a^3*C + 6*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a*A*b + A*b^2 - a*b*B - 3*b^2*B - 2*a^2*C + 3*a*b*C + 3*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(c + d*x)/2]], -((-a + b)/(a + b))])/(3*(a - b)^2*b*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(4*a*A*b^2 - a^2*b*B - 3*b^3*B - 2*a^3*C + 6*a*b^2*C)*Tan[(c + d*x)/2])/(3*(a - b)*b^2*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Sec[c + d*x]^0*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(7*a^2*A*b^2 - 3*A*b^4 - 4*a^3*b*B + a^4*C + 3*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^2*(a - b)^2*b*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a^2*A + 3*a*A*b - 2*A*b^2 - 3*a^2*B - a*b*B + a^2*C + 3*a*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*A*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(7*a^2*A*b^2 - 3*A*b^4 - 4*a^3*b*B + a^4*C + 3*a^2*b^2*C)*Tan[(1/2)*(c + d*x)])/(3*a^2*(a - b)*b*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}
{Cos[c + d*x]^1*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 9, ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*B - 8*a^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(6*a^2*A*b + 3*a*A*b^2 - 5*A*b^3 - 3*a^3*B - 3*a^2*b*B + 2*a*b^2*B + 3*a^3*C + a^2*b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(5*A*b - 2*a*B)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(9*a^2*A*b^2 - 5*A*b^4 - 6*a^3*b*B + 2*a*b^3*B + 3*a^4*C + a^2*b^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^4*A - 26*a^2*A*b^2 + 15*A*b^4 + 14*a^3*b*B - 6*a*b^3*B - 8*a^4*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*a^3*(a^2 - b^2)^2*d)}
{Cos[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 10, -(((33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*B - 56*a^4*b*C + 24*a^2*b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(12*a^4*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - ((6*a^4*A - 9*a^3*A*b + 33*a^2*A*b^2 + 21*a*A*b^3 - 35*A*b^4 - 24*a^3*b*B - 12*a^2*b^2*B + 20*a*b^3*B + 12*a^4*C + 12*a^3*b*C - 8*a^2*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(6*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*a^2*A + 35*A*b^2 - 20*a*b*B + 8*a^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(2*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(11*a^2*A*b^2 - 7*A*b^4 - 8*a^3*b*B + 4*a*b^3*B + 5*a^4*C - a^2*b^2*C)*Cos[c + d*x]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((3*a^4*A - 54*a^2*A*b^2 + 35*A*b^4 + 36*a^3*b*B - 20*a*b^3*B - 24*a^4*C + 8*a^2*b^2*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^2*d) - ((33*a^4*A*b - 170*a^2*A*b^3 + 105*A*b^5 - 12*a^5*B + 104*a^3*b^2*B - 60*a*b^4*B - 56*a^4*b*C + 24*a^2*b^3*C)*Cos[c + d*x]*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(12*a^4*(a^2 - b^2)^2*d)}


{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(3/2), x, 9, -((2*b*(a + b)*(35*a*b*B - 12*a^2*C + 9*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(15*a^3*b*B - 45*a^2*b^2*B - 35*a*b^3*B - 5*b^4*B - 15*a^4*C + 30*a^3*b*C + 12*a^2*b^2*C - 12*a*b^3*C - 9*b^4*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^3*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(35*a*b*B - 12*a^2*C + 9*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(15*d) + (2*b^2*(5*b*B + 3*a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(15*d) + (2*b^2*C*(a + b*Sec[c + d*x])^(3/2)*Tan[c + d*x])/(5*d)}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/2), x, 8, -((2*b*(a + b)*(3*b*B + a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(3*a^2*b*B - 6*a*b^2*B - 3*b^3*B - 3*a^3*C + 3*a^2*b*C - a*b^2*C - b^3*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a^2*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*(3*b*B + a*C)*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/(3*d) + (2*b^2*C*Sqrt[a + b*Sec[c + d*x]]*Tan[c + d*x])/(3*d)}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(1/2), x, 7, -((2*b*(a + b)*C*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) - (2*(a*b*B - b^2*B - a^2*C - b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*a*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*C*Sqrt[a + b*Sec[c + d*x]]*Tan[(1/2)*(c + d*x)])/d}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(3/2), x, 5, -((2*(b*B - a*C - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (4*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*b*(b*B - 2*a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(b*B - a*C - b*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/((a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(b*B - 2*a*C)*Tan[(1/2)*(c + d*x)])/(a*(a + b)*d*Sqrt[a + b*Sec[c + d*x]])}
{(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2*C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(7/2), x, 9, (2*b*(7*a^2*b*B - 3*b^3*B - 11*a^3*C + 3*a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticE[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(3*a^2*b*B + 3*a*b^2*B - 2*b^3*B - 3*a^3*C - 6*a^2*b*C + a*b^2*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticF[ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(3*a*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (4*(b*B - a*C)*Sqrt[1 + Cos[c + d*x]]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(1/2)*(c + d*x)]], -((-a + b)/(a + b))])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*b*(7*a^2*b*B - 3*b^3*B - 11*a^3*C + 3*a*b^2*C)*Tan[(1/2)*(c + d*x)])/(3*a^2*(a - b)*(a + b)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*(b*B - 2*a*C)*Tan[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 9, -((2*(9*A*b + 9*a*B + 7*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(7*a*A + 5*b*B + 5*a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(9*A*b + 9*a*B + 7*b*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(7*a*A + 5*b*B + 5*a*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*(9*A*b + 9*a*B + 7*b*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(45*d) + (2*(9*b*B + 2*a*C)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(63*d) + (2*C*Sec[c + d*x]^(7/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(9*d)}
{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 8, -((2*(5*a*A + 3*b*B + 3*a*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(7*A*b + 7*a*B + 5*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(5*a*A + 3*b*B + 3*a*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(7*A*b + 7*a*B + 5*b*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*(7*b*B + 2*a*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(35*d) + (2*C*Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 7, -((2*(5*A*b + 5*a*B + 3*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(3*a*A + b*B + a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(5*A*b + 5*a*B + 3*b*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(5*b*B + 2*a*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(15*d) + (2*C*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 6, (2*(a*A - b*B - a*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(3*A*b + 3*a*B + b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(3*b*B + 2*a*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*C*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 6, (2*(A*b + a*B - b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(a*A + 3*b*B + 3*a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(A - 3*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 6, (2*(3*a*A + 5*b*B + 5*a*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(A*b + a*B + 3*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(2*A*b + 5*a*B)*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{Sec[c + d*x]^(-7/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 7, (2*(3*A*b + 3*a*B + 5*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(5*a*A + 7*b*B + 7*a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(2*A*b + 7*a*B)*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*(5*a*A + 7*b*B + 7*a*C)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{Sec[c + d*x]^(-9/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x]), x, 8, (2*(7*a*A + 9*b*B + 9*a*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(5*A*b + 5*a*B + 7*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(2*A*b + 9*a*B)*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*(7*a*A + 9*b*B + 9*a*C)*Sin[c + d*x])/(45*d*Sec[c + d*x]^(3/2)) + (2*(5*A*b + 5*a*B + 7*b*C)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}


{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 9, -((2*(15*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 7*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(15*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 7*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(21*d) + (2*(63*A*b^2 + 81*a*b*B + 8*a^2*C + 49*b^2*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(315*d) + (2*(9*b*B + 4*a*C)*Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(63*d) + (2*C*Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(9*d)}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 8, -((2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d)) + (2*(21*a^2*A + 7*A*b^2 + 14*a*b*B + 7*a^2*C + 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*d) + (2*(35*A*b^2 + 49*a*b*B + 8*a^2*C + 25*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(105*d) + (2*(7*b*B + 4*a*C)*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(35*d) + (2*C*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 7, (2*(5*a^2*A - 5*A*b^2 - 10*a*b*B - 5*a^2*C - 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(6*a*A*b + 3*a^2*B + b^2*B + 2*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) + (2*(15*A*b^2 + 25*a*b*B + 8*a^2*C + 9*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(5*b*B + 4*a*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d) + (2*C*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d)}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 7, (2*(2*a*A*b + a^2*B - b^2*B - 2*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/d + (2*(a^2*A + 3*A*b^2 + 6*a*b*B + 3*a^2*C + b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(a*A - 3*b*B - 5*a*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*d) - (2*b*(A - C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d) + (2*A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 7, (2*(3*a^2*A + 5*A*b^2 + 10*a*b*B + 5*a^2*C - 5*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(2*a*A*b + a^2*B + 3*b^2*B + 6*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(7*A*b + 5*a*B - 15*b*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(4*A*b + 5*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{Sec[c + d*x]^(-7/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 7, (2*(6*a*A*b + 3*a^2*B + 5*b^2*B + 10*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B + 7*a^2*C + 21*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(25*a^2*A + 8*A*b^2 + 49*a*b*B + 35*a^2*C)*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (2*(4*A*b + 7*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{Sec[c + d*x]^(-9/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^2, x, 8, (2*(7*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 15*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(49*a^2*A + 8*A*b^2 + 81*a*b*B + 63*a^2*C)*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*Sin[c + d*x])/(21*d*Sqrt[Sec[c + d*x]]) + (2*(4*A*b + 9*a*B)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*A*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}


{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 9, -((2*(45*a^2*A*b + 9*A*b^3 + 15*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 7*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(21*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 5*b^3*B + 7*a^3*C + 15*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(45*a^2*A*b + 9*A*b^3 + 15*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 7*b^3*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(252*a*A*b^2 + 171*a^2*b*B + 75*b^3*B + 16*a^3*C + 176*a*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*(63*A*b^2 + 99*a*b*B + 24*a^2*C + 49*b^2*C)*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(315*d) + (2*(3*b*B + 2*a*C)*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(21*d) + (2*C*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(9*d)}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 8, (2*(5*a^3*A - 15*a*A*b^2 - 15*a^2*b*B - 3*b^3*B - 5*a^3*C - 9*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(63*a^2*A*b + 7*A*b^3 + 21*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 5*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(280*a*A*b^2 + 231*a^2*b*B + 63*b^3*B + 48*a^3*C + 164*a*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(35*A*b^2 + 63*a*b*B + 24*a^2*C + 25*b^2*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(105*d) + (2*(7*b*B + 6*a*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(35*d) + (2*C*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(7*d)}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 8, (2*(15*a^2*A*b - 5*A*b^3 + 5*a^3*B - 15*a*b^2*B - 15*a^2*b*C - 3*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(a^3*A + 9*a*A*b^2 + 9*a^2*b*B + b^3*B + 3*a^3*C + 3*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(5*a^2*A - 15*A*b^2 - 40*a*b*B - 33*a^2*C - 9*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(5*a*A - 5*b*B - 9*a*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d) - (2*b*(5*A - 3*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(15*d) + (2*A*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 8, (2*(3*a^3*A + 15*a*A*b^2 + 15*a^2*b*B - 5*b^3*B + 5*a^3*C - 15*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(3*a^2*A*b + 3*A*b^3 + a^3*B + 9*a*b^2*B + 9*a^2*b*C + b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(12*a*A*b + 5*a^2*B - 15*b^2*B - 40*a*b*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(9*A*b + 5*a*B - 5*b*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d) + (2*(6*A*b + 5*a*B)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{Sec[c + d*x]^(-7/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 8, (2*(9*a^2*A*b + 5*A*b^3 + 3*a^3*B + 15*a*b^2*B + 15*a^2*b*C - 5*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(5*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 21*b^3*B + 7*a^3*C + 63*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b*(25*a^2*A + 57*A*b^2 + 84*a*b*B + 35*a^2*C - 105*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(25*a^2*A + 24*A*b^2 + 63*a*b*B + 35*a^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (2*(6*A*b + 7*a*B)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*A*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{Sec[c + d*x]^(-9/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 8, (2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B + 9*a^3*C + 45*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 21*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(176*a^2*A*b + 16*A*b^3 + 75*a^3*B + 171*a*b^2*B + 252*a^2*b*C)*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) + (2*(49*a^2*A + 24*A*b^2 + 99*a*b*B + 63*a^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (2*(2*A*b + 3*a*B)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(21*d*Sec[c + d*x]^(5/2)) + (2*A*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}
{Sec[c + d*x]^(-11/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^3, x, 9, (2*(21*a^2*A*b + 9*A*b^3 + 7*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 15*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B + 55*a^3*C + 231*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(1212*a^2*A*b + 48*A*b^3 + 539*a^3*B + 979*a*b^2*B + 1584*a^2*b*C)*Sin[c + d*x])/(3465*d*Sec[c + d*x]^(3/2)) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B + 55*a^3*C + 231*a*b^2*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]]) + (2*(81*a^2*A + 24*A*b^2 + 143*a*b*B + 99*a^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(693*d*Sec[c + d*x]^(5/2)) + (2*(6*A*b + 11*a*B)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(99*d*Sec[c + d*x]^(7/2)) + (2*A*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(11*d*Sec[c + d*x]^(9/2))}


{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 10, -((2*(60*a^3*A*b + 36*a*A*b^3 + 15*a^4*B + 54*a^2*b^2*B + 7*b^4*B + 36*a^3*b*C + 28*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d)) + (2*(231*a^4*A + 462*a^2*A*b^2 + 55*A*b^4 + 308*a^3*b*B + 220*a*b^3*B + 77*a^4*C + 330*a^2*b^2*C + 45*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(60*a^3*A*b + 36*a*A*b^3 + 15*a^4*B + 54*a^2*b^2*B + 7*b^4*B + 36*a^3*b*C + 28*a*b^3*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(4653*a^2*A*b^2 + 825*A*b^4 + 2057*a^3*b*B + 2761*a*b^3*B + 128*a^4*C + 3199*a^2*b^2*C + 675*b^4*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3465*d) + (2*(1782*a*A*b^2 + 1353*a^2*b*B + 539*b^3*B + 192*a^3*C + 1346*a*b^2*C)*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3465*d) + (2*(33*A*b^2 + 55*a*b*B + 16*a^2*C + 27*b^2*C)*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(231*d) + (2*(11*b*B + 8*a*C)*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(99*d) + (2*C*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(11*d)}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 9, (2*(15*a^4*A - 90*a^2*A*b^2 - 9*A*b^4 - 60*a^3*b*B - 36*a*b^3*B - 15*a^4*C - 54*a^2*b^2*C - 7*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(84*a^3*A*b + 28*a*A*b^3 + 21*a^4*B + 42*a^2*b^2*B + 5*b^4*B + 28*a^3*b*C + 20*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) + (2*(1533*a^2*A*b^2 + 189*A*b^4 + 837*a^3*b*B + 681*a*b^3*B + 128*a^4*C + 883*a^2*b^2*C + 147*b^4*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(315*d) + (2*(294*a*A*b^2 + 261*a^2*b*B + 75*b^3*B + 64*a^3*C + 202*a*b^2*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(315*d) + (2*(63*A*b^2 + 117*a*b*B + 48*a^2*C + 49*b^2*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(315*d) + (2*(9*b*B + 8*a*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(63*d) + (2*C*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(9*d)}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 9, (2*(20*a^3*A*b - 20*a*A*b^3 + 5*a^4*B - 30*a^2*b^2*B - 3*b^4*B - 20*a^3*b*C - 12*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(7*a^4*A + 126*a^2*A*b^2 + 7*A*b^4 + 84*a^3*b*B + 28*a*b^3*B + 21*a^4*C + 42*a^2*b^2*C + 5*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b*(35*a^3*A - 385*a*A*b^2 - 511*a^2*b*B - 63*b^3*B - 279*a^3*C - 227*a*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(105*d) - (2*b*(35*a^2*A - 35*A*b^2 - 98*a*b*B - 87*a^2*C - 25*b^2*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(105*d) - (2*b*(35*a*A - 21*b*B - 39*a*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(105*d) - (2*b*(7*A - 3*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(21*d) + (2*A*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 9, (2*(3*a^4*A + 30*a^2*A*b^2 - 5*A*b^4 + 20*a^3*b*B - 20*a*b^3*B + 5*a^4*C - 30*a^2*b^2*C - 3*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(4*a^3*A*b + 12*a*A*b^3 + a^4*B + 18*a^2*b^2*B + b^4*B + 12*a^3*b*C + 4*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*d) - (2*b*(17*a^2*A*b - 15*A*b^3 + 5*a^3*B - 55*a*b^2*B - 73*a^2*b*C - 9*b^3*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(15*d) - (2*b*(14*a*A*b + 5*a^2*B - 5*b^2*B - 14*a*b*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d) - (2*b*(11*A*b + 5*a*B - 3*b*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(15*d) + (2*(8*A*b + 5*a*B)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{Sec[c + d*x]^(-7/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 9, (2*(12*a^3*A*b + 20*a*A*b^3 + 3*a^4*B + 30*a^2*b^2*B - 5*b^4*B + 20*a^3*b*C - 20*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*d) + (2*(5*a^4*A + 42*a^2*A*b^2 + 21*A*b^4 + 28*a^3*b*B + 84*a*b^3*B + 7*a^4*C + 126*a^2*b^2*C + 7*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b*(25*a^3*A + 141*a*A*b^2 + 119*a^2*b*B - 105*b^3*B + 35*a^3*C - 385*a*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(105*d) - (2*b*(25*a^2*A + 87*A*b^2 + 98*a*b*B + 35*a^2*C - 35*b^2*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(105*d) + (2*(25*a^2*A + 48*A*b^2 + 77*a*b*B + 35*a^2*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (2*(8*A*b + 7*a*B)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*A*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{Sec[c + d*x]^(-9/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 9, (2*(7*a^4*A + 54*a^2*A*b^2 + 15*A*b^4 + 36*a^3*b*B + 60*a*b^3*B + 9*a^4*C + 90*a^2*b^2*C - 15*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(20*a^3*A*b + 28*a*A*b^3 + 5*a^4*B + 42*a^2*b^2*B + 21*b^4*B + 28*a^3*b*C + 84*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*d) - (2*b*(251*a^2*A*b + 187*A*b^3 + 75*a^3*B + 423*a*b^2*B + 357*a^2*b*C - 315*b^3*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(315*d) + (2*(202*a^2*A*b + 64*A*b^3 + 75*a^3*B + 261*a*b^2*B + 294*a^2*b*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(315*d*Sqrt[Sec[c + d*x]]) + (2*(49*a^2*A + 48*A*b^2 + 117*a*b*B + 63*a^2*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (2*(8*A*b + 9*a*B)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*A*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}
{Sec[c + d*x]^(-11/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 9, (2*(28*a^3*A*b + 36*a*A*b^3 + 7*a^4*B + 54*a^2*b^2*B + 15*b^4*B + 36*a^3*b*C + 60*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(15*d) + (2*(45*a^4*A + 330*a^2*A*b^2 + 77*A*b^4 + 220*a^3*b*B + 308*a*b^3*B + 55*a^4*C + 462*a^2*b^2*C + 231*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(675*a^4*A + 3199*a^2*A*b^2 + 128*A*b^4 + 2761*a^3*b*B + 2057*a*b^3*B + 825*a^4*C + 4653*a^2*b^2*C)*Sin[c + d*x])/(3465*d*Sqrt[Sec[c + d*x]]) + (2*(1346*a^2*A*b + 192*A*b^3 + 539*a^3*B + 1353*a*b^2*B + 1782*a^2*b*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3465*d*Sec[c + d*x]^(3/2)) + (2*(27*a^2*A + 16*A*b^2 + 55*a*b*B + 33*a^2*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(231*d*Sec[c + d*x]^(5/2)) + (2*(8*A*b + 11*a*B)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(99*d*Sec[c + d*x]^(7/2)) + (2*A*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(11*d*Sec[c + d*x]^(9/2))}
{Sec[c + d*x]^(-13/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^4, x, 10, (2*(77*a^4*A + 546*a^2*A*b^2 + 117*A*b^4 + 364*a^3*b*B + 468*a*b^3*B + 91*a^4*C + 702*a^2*b^2*C + 195*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(195*d) + (2*(180*a^3*A*b + 220*a*A*b^3 + 45*a^4*B + 330*a^2*b^2*B + 77*b^4*B + 220*a^3*b*C + 308*a*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(231*d) + (2*(5929*a^4*A + 25217*a^2*A*b^2 + 384*A*b^4 + 22763*a^3*b*B + 13351*a*b^3*B + 7007*a^4*C + 33319*a^2*b^2*C)*Sin[c + d*x])/(45045*d*Sec[c + d*x]^(3/2)) + (2*(180*a^3*A*b + 220*a*A*b^3 + 45*a^4*B + 330*a^2*b^2*B + 77*b^4*B + 220*a^3*b*C + 308*a*b^3*C)*Sin[c + d*x])/(231*d*Sqrt[Sec[c + d*x]]) + (2*(2518*a^2*A*b + 192*A*b^3 + 1053*a^3*B + 2171*a*b^2*B + 3146*a^2*b*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(9009*d*Sec[c + d*x]^(5/2)) + (2*(121*a^2*A + 48*A*b^2 + 221*a*b*B + 143*a^2*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(1287*d*Sec[c + d*x]^(7/2)) + (2*(8*A*b + 13*a*B)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(143*d*Sec[c + d*x]^(9/2)) + (2*A*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(13*d*Sec[c + d*x]^(11/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 10, -((2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*b^3*d)) + (2*(b*B - a*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^2*d) - (2*a*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a + b)*d) + (2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(5*b^3*d) + (2*(b*B - a*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b^2*d) + (2*C*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(5*b*d)}
{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 9, -((2*(b*B - a*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*d)) + (2*C*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b*d) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a + b)*d) + (2*(b*B - a*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b^2*d) + (2*C*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*d)}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 8, -((2*C*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b*d)) + (2*A*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d) - (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*b*(a + b)*d) + (2*C*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b*d)}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 7, (2*A*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*d) - (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*d) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a + b)*d)}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 8, -((2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*d)) + (2*(a^2*A + 3*A*b^2 - 3*a*b*B + 3*a^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^3*d) - (2*b*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a + b)*d) + (2*A*Sin[c + d*x])/(3*a*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 9, (2*(3*a^2*A + 5*A*b^2 - 5*a*b*B + 5*a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*a^3*d) - (2*(a^2*A*b + 3*A*b^3 - a^3*B - 3*a*b^2*B + 3*a^2*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^4*d) + (2*b^2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^4*(a + b)*d) + (2*A*Sin[c + d*x])/(5*a*d*Sec[c + d*x]^(3/2)) - (2*(A*b - a*B)*Sin[c + d*x])/(3*a^2*d*Sqrt[Sec[c + d*x]])}
{Sec[c + d*x]^(-7/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x]), x, 10, -((2*(3*a^2*A*b + 5*A*b^3 - 3*a^3*B - 5*a*b^2*B + 5*a^2*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*a^4*d)) + (2*(5*a^4*A + 7*a^2*A*b^2 + 21*A*b^4 - 7*a^3*b*B - 21*a*b^3*B + 7*a^4*C + 21*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(21*a^5*d) - (2*b^3*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^5*(a + b)*d) + (2*A*Sin[c + d*x])/(7*a*d*Sec[c + d*x]^(5/2)) - (2*(A*b - a*B)*Sin[c + d*x])/(5*a^2*d*Sec[c + d*x]^(3/2)) + (2*(5*a^2*A + 7*A*b^2 - 7*a*b*B + 7*a^2*C)*Sin[c + d*x])/(21*a^3*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 10, ((a*A*b^2 - 3*a^2*b*B + 2*b^3*B + 5*a^3*C - 4*a*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^3*(a^2 - b^2)*d) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*b^2*(a^2 - b^2)*d) + ((a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 5*a*b^3*B + 5*a^4*C - 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/((a - b)*b^3*(a + b)^2*d) - ((a*A*b^2 - 3*a^2*b*B + 2*b^3*B + 5*a^3*C - 4*a*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b^3*(a^2 - b^2)*d) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 9, -(((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(b^2*(a^2 - b^2)*d)) - ((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*b*(a^2 - b^2)*d) + ((a^2*A*b^2 + A*b^4 + a^3*b*B - 3*a*b^3*B - 3*a^4*C + 5*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*(a - b)*b^2*(a + b)^2*d) + ((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b^2*(a^2 - b^2)*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 8, ((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a*b*(a^2 - b^2)*d) + ((2*a^2*A - A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d) - ((3*a^2*A*b^2 - A*b^4 - a^3*b*B - a*b^3*B - a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*b*(a + b)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 8, ((2*a^2*A - 3*A*b^2 + a*b*B - a^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^2*(a^2 - b^2)*d) - ((4*a^2*A*b - 3*A*b^3 - 2*a^3*B + a*b^2*B + a^2*b*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d) + ((5*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + a*b^3*B + a^4*C + a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a - b)*(a + b)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 9, -(((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B - a^2*b*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^3*(a^2 - b^2)*d)) + ((2*a^4*A + 16*a^2*A*b^2 - 15*A*b^4 - 12*a^3*b*B + 9*a*b^3*B + 6*a^4*C - 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^4*(a^2 - b^2)*d) - (b*(7*a^2*A*b^2 - 5*A*b^4 - 5*a^3*b*B + 3*a*b^3*B + 3*a^4*C - a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^4*(a - b)*(a + b)^2*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B - 3*a^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^2, x, 10, ((6*a^4*A + 24*a^2*A*b^2 - 35*A*b^4 - 20*a^3*b*B + 25*a*b^3*B + 10*a^4*C - 15*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(5*a^4*(a^2 - b^2)*d) - ((4*a^4*A*b + 20*a^2*A*b^3 - 21*A*b^5 - 2*a^5*B - 16*a^3*b^2*B + 15*a*b^4*B + 12*a^4*b*C - 9*a^2*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(3*a^5*(a^2 - b^2)*d) + (b^2*(9*a^2*A*b^2 - 7*A*b^4 - 7*a^3*b*B + 5*a*b^3*B + 5*a^4*C - 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(a^5*(a - b)*(a + b)^2*d) + ((2*a^2*A - 7*A*b^2 + 5*a*b*B - 5*a^2*C)*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)) - ((4*a^2*A*b - 7*A*b^3 - 2*a^3*B + 5*a*b^2*B - 3*a^2*b*C)*Sin[c + d*x])/(3*a^3*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x]))}


{Sec[c + d*x]^(7/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 11, ((3*a^3*A*b^2 - 9*a*A*b^4 - 15*a^4*b*B + 29*a^2*b^3*B - 8*b^5*B + 35*a^5*C - 65*a^3*b^2*C + 24*a*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^4*(a^2 - b^2)^2*d) + ((3*a^2*A*b^2 - 21*A*b^4 - 15*a^3*b*B + 33*a*b^3*B + 35*a^4*C - 61*a^2*b^2*C + 8*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*b^3*(a^2 - b^2)^2*d) + ((3*a^4*A*b^2 - 6*a^2*A*b^4 + 15*A*b^6 - 15*a^5*b*B + 38*a^3*b^3*B - 35*a*b^5*B + 35*a^6*C - 86*a^4*b^2*C + 63*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*(a - b)^2*b^4*(a + b)^3*d) - ((3*a^3*A*b^2 - 9*a*A*b^4 - 15*a^4*b*B + 29*a^2*b^3*B - 8*b^5*B + 35*a^5*C - 65*a^3*b^2*C + 24*a*b^4*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b^4*(a^2 - b^2)^2*d) + ((3*a^2*A*b^2 - 21*A*b^4 - 15*a^3*b*B + 33*a*b^3*B + 35*a^4*C - 61*a^2*b^2*C + 8*b^4*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(7/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 7*a^4*C + 13*a^2*b^2*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 10, ((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 15*a^4*C + 29*a^2*b^2*C - 8*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*b^3*(a^2 - b^2)^2*d) + ((3*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + 11*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*b^2*(a^2 - b^2)^2*d) + ((a^4*A*b^2 - 10*a^2*A*b^4 - 3*A*b^6 + 3*a^5*b*B - 6*a^3*b^3*B + 15*a*b^5*B - 15*a^6*C + 38*a^4*b^2*C - 35*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*(a - b)^2*b^3*(a + b)^3*d) - ((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 15*a^4*C + 29*a^2*b^2*C - 8*b^4*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b^3*(a^2 - b^2)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((3*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + 11*a^2*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 9, -(((5*a^2*A*b^2 + A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + 9*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a*b^2*(a^2 - b^2)^2*d)) - ((7*a^2*A*b^2 - A*b^4 - 3*a^3*b*B - 3*a*b^3*B - a^4*C + 7*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*b*(a^2 - b^2)^2*d) + ((3*a^4*A*b^2 + 10*a^2*A*b^4 - A*b^6 + a^5*b*B - 10*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C - 6*a^4*b^2*C + 15*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*(a - b)^2*b^2*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((5*a^2*A*b^2 + A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + 9*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 9, ((9*a^2*A*b^2 - 3*A*b^4 - 5*a^3*b*B - a*b^3*B + a^4*C + 5*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^2*b*(a^2 - b^2)^2*d) + ((8*a^4*A - 5*a^2*A*b^2 + 3*A*b^4 - 7*a^3*b*B + a*b^3*B + 3*a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d) - ((15*a^4*A*b^2 - 6*a^2*A*b^4 + 3*A*b^6 - 3*a^5*b*B - 10*a^3*b^3*B + a*b^5*B - a^6*C + 10*a^4*b^2*C + 3*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a - b)^2*b*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) - ((7*a^2*A*b^2 - A*b^4 - 3*a^3*b*B - 3*a*b^3*B - a^4*C + 7*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a*b*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 9, ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B - 5*a^4*C - a^2*b^2*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^3*(a^2 - b^2)^2*d) - ((24*a^4*A*b - 33*a^2*A*b^3 + 15*A*b^5 - 8*a^5*B + 5*a^3*b^2*B - 3*a*b^4*B + 7*a^4*b*C - a^2*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d) + ((35*a^4*A*b^2 - 38*a^2*A*b^4 + 15*A*b^6 - 15*a^5*b*B + 6*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C + 10*a^4*b^2*C - a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a - b)^2*(a + b)^3*d) + ((A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((11*a^2*A*b^2 - 5*A*b^4 - 7*a^3*b*B + a*b^3*B + 3*a^4*C + 3*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{Sec[c + d*x]^(-3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^3, x, 10, -(((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B - 9*a^4*b*C + 3*a^2*b^3*C)*Sqrt[Cos[c + d*x]]*EllipticE[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^4*(a^2 - b^2)^2*d)) + ((8*a^6*A + 128*a^4*A*b^2 - 223*a^2*A*b^4 + 105*A*b^6 - 72*a^5*b*B + 99*a^3*b^3*B - 45*a*b^5*B + 24*a^6*C - 15*a^4*b^2*C + 9*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticF[(1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(12*a^5*(a^2 - b^2)^2*d) - (b*(63*a^4*A*b^2 - 86*a^2*A*b^4 + 35*A*b^6 - 35*a^5*b*B + 38*a^3*b^3*B - 15*a*b^5*B + 15*a^6*C - 6*a^4*b^2*C + 3*a^2*b^4*C)*Sqrt[Cos[c + d*x]]*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2]*Sqrt[Sec[c + d*x]])/(4*a^5*(a - b)^2*(a + b)^3*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B - 21*a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]]) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^2) + ((13*a^2*A*b^2 - 7*A*b^4 - 9*a^3*b*B + 3*a*b^3*B + 5*a^4*C + a^2*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Sec[c+d x]^(m/2) (A+B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/2)*)
(**)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 12, -((a + b)*(24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*b^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((24*A*b^2 + 18*a*b*B - a^2*C + 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((8*a*A*b^2 - 2*a^2*b*B + 8*b^3*B + a^3*C + 4*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(8*b^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*b^2*d) + ((6*b*B + a*C)*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*b*d) + (C*Sec[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 11, -((a + b)*(4*b*B + a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((8*a*A + 4*b*B + 3*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((8*A*b^2 + 4*a*b*B - a^2*C + 4*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*b*B + a*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b*d) + (C*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d)}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sqrt[Sec[c + d*x]], x, 10, ((a + b)*(2*A - C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + ((2*a*B + b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + ((2*b*B + a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (C*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 10, (2*(a + b)*(A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - A*b^2 + 3*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(5/2), x, 8, (2*(a + b)*(9*a^2*A - 2*A*b^2 + 5*a*b*B + 15*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^2*A*b - 2*A*b^3 - 5*a^3*B + 5*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2)) + (2*(A*b + 5*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a*d*Sqrt[Sec[c + d*x]])}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(7/2), x, 9, (2*(a + b)*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B + 35*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 17*a^2*A*b^2 - 8*A*b^4 - 14*a^3*b*B + 14*a*b^3*B + 35*a^4*C - 35*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2)) + (2*(A*b + 7*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*a*d*Sec[c + d*x]^(3/2)) + (2*(25*a^2*A - 4*A*b^2 + 7*a*b*B + 35*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a^2*d*Sqrt[Sec[c + d*x]])}
{(Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(9/2), x, 10, (2*(a + b)*(147*a^4*A - 24*a^2*A*b^2 - 16*A*b^4 + 57*a^3*b*B + 24*a*b^3*B + 189*a^4*C - 42*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^4*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(36*a^4*A*b - 20*a^2*A*b^3 - 16*A*b^5 - 75*a^5*B + 51*a^3*b^2*B + 24*a*b^4*B + 42*a^4*b*C - 42*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^4*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2)) + (2*(A*b + 9*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(63*a*d*Sec[c + d*x]^(5/2)) + (2*(49*a^2*A - 6*A*b^2 + 9*a*b*B + 63*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a^2*d*Sec[c + d*x]^(3/2)) + (2*(13*a^2*A*b + 8*A*b^3 + 75*a^3*B - 12*a*b^2*B + 21*a^2*b*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a^3*d*Sqrt[Sec[c + d*x]])}


{Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 13, -(((a + b)*(240*a*A*b^2 + 24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(192*b^2*d*Sqrt[a + b*Sec[c + d*x]])) + ((336*a*A*b^2 + 136*a^2*b*B + 128*b^3*B - 3*a^3*C + 228*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(192*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^2*A*b^2 + 64*A*b^4 - 8*a^3*b*B + 96*a*b^3*B + 3*a^4*C + 24*a^2*b^2*C + 48*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(64*b^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((240*a*A*b^2 + 24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(192*b^2*d) + ((48*A*b^2 + 56*a*b*B + 3*a^2*C + 36*b^2*C)*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(96*b*d) + ((8*b*B + 3*a*C)*Sec[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + (C*Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(4*d)}
{Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 12, -((a + b)*(24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^2*A + 24*A*b^2 + 42*a*b*B + 17*a^2*C + 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Sec[c + d*x]]) + ((24*a*A*b^2 + 6*a^2*b*B + 8*b^3*B - a^3*C + 12*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(8*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*b*d) + ((2*b*B + a*C)*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (C*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d)}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sqrt[Sec[c + d*x]], x, 11, ((a + b)*(8*a*A - 4*b*B - 5*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((8*a*A*b + 8*a^2*B + 4*b^2*B + 7*a*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((8*A*b^2 + 12*a*b*B + 3*a^2*C + 4*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*b*B + 3*a*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d) + (C*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(2*d)}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 11, ((a + b)*(8*A*b + 6*a*B - 3*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + ((2*a^2*A - 2*A*b^2 + 6*a*b*B + 6*a^2*C + 3*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*d*Sqrt[a + b*Sec[c + d*x]]) + (b*(2*b*B + 3*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) - (b*(2*A - 3*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d) + (2*A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(5/2), x, 11, (2*(a + b)*(9*a^2*A + 3*A*b^2 + 20*a*b*B + 15*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2*A*b - 3*A*b^3 + 5*a^3*B - 5*a*b^2*B + 15*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b + 5*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(7/2), x, 9, (2*(a + b)*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B + 140*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 31*a^2*A*b^2 + 6*A*b^4 + 21*a^3*b*B - 21*a*b^3*B + 35*a^4*C - 35*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b + 7*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*(25*a^2*A + 3*A*b^2 + 42*a*b*B + 35*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{((a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(9/2), x, 10, (2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(39*a^4*A*b - 31*a^2*A*b^3 - 8*A*b^5 + 75*a^5*B - 93*a^3*b^2*B + 18*a*b^4*B + 63*a^4*b*C - 63*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b + 3*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(21*d*Sec[c + d*x]^(5/2)) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B + 63*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d*Sec[c + d*x]^(3/2)) + (2*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B + 126*a^2*b*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a^2*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}


{Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 13, -((a + b)*(432*a*A*b^2 + 264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(192*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((384*a^3*A + 528*a*A*b^2 + 472*a^2*b*B + 128*b^3*B + 133*a^3*C + 356*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(192*d*Sqrt[a + b*Sec[c + d*x]]) + ((240*a^2*A*b^2 + 64*A*b^4 + 40*a^3*b*B + 160*a*b^3*B - 5*a^4*C + 120*a^2*b^2*C + 48*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(64*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((432*a*A*b^2 + 264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(192*b*d) + ((16*A*b^2 + 24*a*b*B + 5*a^2*C + 12*b^2*C)*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(32*d) + ((8*b*B + 5*a*C)*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(24*d) + (C*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(4*d)}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sqrt[Sec[c + d*x]], x, 12, ((a + b)*(48*a^2*A - 24*A*b^2 - 54*a*b*B - 33*a^2*C - 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Sec[c + d*x]]) + ((96*a^2*A*b + 24*A*b^3 + 48*a^3*B + 66*a*b^2*B + 59*a^2*b*C + 16*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(24*d*Sqrt[a + b*Sec[c + d*x]]) + ((40*a*A*b^2 + 30*a^2*b*B + 8*b^3*B + 5*a^3*C + 20*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(8*d*Sqrt[a + b*Sec[c + d*x]]) + ((24*A*b^2 + 42*a*b*B + 15*a^2*C + 16*b^2*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d) + ((6*b*B + 5*a*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(12*d) + (C*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(3*d)}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(3/2), x, 12, ((a + b)*(56*a*A*b + 24*a^2*B - 12*b^2*B - 27*a*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Sec[c + d*x]]) + ((8*a^3*A + 16*a*A*b^2 + 48*a^2*b*B + 12*b^3*B + 24*a^3*C + 33*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(12*d*Sqrt[a + b*Sec[c + d*x]]) + (b*(8*A*b^2 + 20*a*b*B + 15*a^2*C + 4*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*d*Sqrt[a + b*Sec[c + d*x]]) - (b*(8*a*A - 12*b*B - 21*a*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*d) - (b*(4*A - 3*C)*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(6*d) + (2*A*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]])}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(5/2), x, 12, ((a + b)*(18*a^2*A + 46*A*b^2 + 70*a*b*B + 30*a^2*C - 15*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Sec[c + d*x]]) + ((16*a^2*A*b - 16*A*b^3 + 10*a^3*B + 20*a*b^2*B + 60*a^2*b*C + 15*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*d*Sqrt[a + b*Sec[c + d*x]]) + (b^2*(2*b*B + 5*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) - (b*(16*A*b + 10*a*B - 15*b*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*(A*b + a*B)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) + (2*A*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(5*d*Sec[c + d*x]^(3/2))}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(7/2), x, 12, (2*(a + b)*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B + 245*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 10*a^2*A*b^2 - 15*A*b^4 + 56*a^3*b*B - 56*a*b^3*B + 35*a^4*C + 70*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*b^3*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^2*A + 15*A*b^2 + 56*a*b*B + 35*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*d*Sqrt[Sec[c + d*x]]) + (2*(5*A*b + 7*a*B)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(35*d*Sec[c + d*x]^(3/2)) + (2*A*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(7*d*Sec[c + d*x]^(5/2))}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(9/2), x, 10, (2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(114*a^4*A*b - 124*a^2*A*b^3 + 10*A*b^5 + 75*a^5*B - 30*a^3*b^2*B - 45*a*b^4*B + 168*a^4*b*C - 168*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(315*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(49*a^2*A + 15*A*b^2 + 90*a*b*B + 63*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*d*Sec[c + d*x]^(3/2)) + (2*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B + 231*a^2*b*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d*Sqrt[Sec[c + d*x]]) + (2*(5*A*b + 9*a*B)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(63*d*Sec[c + d*x]^(5/2)) + (2*A*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(9*d*Sec[c + d*x]^(7/2))}
{((a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(11/2), x, 11, (2*(a + b)*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B + 4785*a^4*b*C + 495*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3465*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(675*a^6*A - 390*a^4*A*b^2 - 245*a^2*A*b^4 - 40*A*b^6 + 1254*a^5*b*B - 1364*a^3*b^3*B + 110*a*b^5*B + 825*a^6*C - 330*a^4*b^2*C - 495*a^2*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3465*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(27*a^2*A + 5*A*b^2 + 44*a*b*B + 33*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(231*d*Sec[c + d*x]^(5/2)) + (2*(1145*a^2*A*b + 15*A*b^3 + 539*a^3*B + 825*a*b^2*B + 1485*a^2*b*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3465*a*d*Sec[c + d*x]^(3/2)) + (2*(675*a^4*A + 1025*a^2*A*b^2 - 20*A*b^4 + 1793*a^3*b*B + 55*a*b^3*B + 825*a^4*C + 1485*a^2*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3465*a^2*d*Sqrt[Sec[c + d*x]]) + (2*(5*A*b + 11*a*B)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(99*d*Sec[c + d*x]^(7/2)) + (2*A*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(11*d*Sec[c + d*x]^(9/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sqrt[a + b*Sec[c + d*x]], x, 11, -((a + b)*(4*b*B - 3*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*b*B - a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b*d*Sqrt[a + b*Sec[c + d*x]]) + ((8*A*b^2 - 4*a*b*B + 3*a^2*C + 4*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(4*b^2*d*Sqrt[a + b*Sec[c + d*x]]) + ((4*b*B - 3*a*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b^2*d) + (C*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*b*d)}
{(Sqrt[Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sqrt[a + b*Sec[c + d*x]], x, 10, -(((a + b)*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]])) + ((2*A + C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + ((2*b*B - a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]]) + (C*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b*d)}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]), x, 9, (2*A*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]), x, 7, (-2*(a + b)*(2*A*b - 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A + 2*A*b^2 - 3*a*b*B + 3*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a*d*Sqrt[Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sec[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]), x, 8, (2*(a + b)*(9*a^2*A + 8*A*b^2 - 10*a*b*B + 15*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^3*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(7*a^2*A*b + 8*A*b^3 - 5*a^3*B - 10*a*b^2*B + 15*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a*d*Sec[c + d*x]^(3/2)) - (2*(4*A*b - 5*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^2*d*Sqrt[Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sec[c + d*x]^(7/2)*Sqrt[a + b*Sec[c + d*x]]), x, 9, (-2*(a + b)*(44*a^2*A*b + 48*A*b^3 - 63*a^3*B - 56*a*b^2*B + 70*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^4*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A + 32*a^2*A*b^2 + 48*A*b^4 - 49*a^3*b*B - 56*a*b^3*B + 35*a^4*C + 70*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(105*a^4*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*a*d*Sec[c + d*x]^(5/2)) - (2*(6*A*b - 7*a*B)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*a^2*d*Sec[c + d*x]^(3/2)) + (2*(25*a^2*A + 24*A*b^2 - 28*a*b*B + 35*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a^3*d*Sqrt[Sec[c + d*x]])}

{(Sqrt[Sec[c + d*x]]*(a*A + (A*b + a*B)*Sec[c + d*x] + b*B*Sec[c + d*x]^2))/Sqrt[a + b*Sec[c + d*x]], x, 10, -(((a + b)*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]])) + ((2*a*A + b*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b + a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(d*Sqrt[a + b*Sec[c + d*x]]) + (B*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/d}


{(Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(3/2), x, 11, -(((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/((a - b)*b^2*d*Sqrt[a + b*Sec[c + d*x]])) + (C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]]) + ((2*b*B - 3*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b^2*(a^2 - b^2)*d)}
{(Sqrt[Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(3/2), x, 10, (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*(a - b)*b*d*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a*d*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)), x, 7, (2*(a^2*A - 2*A*b^2 + a*b*B - a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a^2*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(a^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)), x, 8, (-2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B - 3*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A + 8*A*b^2 - 6*a*b*B + 3*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - 4*A*b^2 + 3*a*b*B - 3*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)), x, 9, (2*(9*a^4*A + 24*a^2*A*b^2 - 48*A*b^4 - 25*a^3*b*B + 40*a*b^3*B + 15*a^4*C - 30*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^4*(a - b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(12*a^2*A*b + 48*A*b^3 - 5*a^3*B - 40*a*b^2*B + 30*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^4*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - 6*A*b^2 + 5*a*b*B - 5*a^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)) - (2*(9*a^2*A*b - 24*A*b^3 - 5*a^3*B + 20*a*b^2*B - 15*a^2*b*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]])}


{(Sec[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(5/2), x, 12, ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b^2 - 2*a*b*B + 5*a^2*C - 3*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*b^2*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + ((2*b*B - 5*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b^3*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(5/2)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(a^2*A*b^2 + 3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 5*a^4*C + 9*a^2*b^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) - ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)^2*d)}
{(Sec[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(5/2), x, 11, (-2*(3*a^2*A*b^2 + A*b^4 - 4*a*b^3*B - 3*a^4*C + 7*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*(a - b)^2*b^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a*b*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(b^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sec[c + d*x]^(3/2)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(3*a^2*A*b^2 + A*b^4 - 4*a*b^3*B - 3*a^4*C + 7*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{(Sqrt[Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B + 4*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2*A - 2*A*b^2 - a*b*B + a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^2*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) - (2*(5*a^2*A*b^2 - A*b^4 - 2*a^3*b*B - 2*a*b^3*B - a^4*C + 5*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*b*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(5/2)), x, 8, (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B - 3*a^4*C - a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(9*a^2*A*b - 8*A*b^3 - 3*a^3*B + 2*a*b^2*B + a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^3*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(8*a^2*A*b^2 - 4*A*b^4 - 5*a^3*b*B + a*b^3*B + 2*a^4*C + 2*a^2*b^2*C)*Sqrt[Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2)), x, 9, (-2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 6*a^4*b*C + 2*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4*A + 16*a^2*A*b^2 - 16*A*b^4 - 9*a^3*b*B + 8*a*b^3*B + 3*a^4*C - 2*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(3*a^4*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Sec[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) + (2*(10*a^2*A*b^2 - 6*A*b^4 - 7*a^3*b*B + 3*a*b^3*B + 4*a^4*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B - 5*a^4*C + a^2*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sec[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(5/2)), x, 10, (2*(9*a^6*A + 55*a^4*A*b^2 - 212*a^2*A*b^4 + 128*A*b^6 - 40*a^5*b*B + 140*a^3*b^3*B - 80*a*b^5*B + 15*a^6*C - 75*a^4*b^2*C + 40*a^2*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^5*(a - b)^2*(a + b)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(17*a^4*A*b + 116*a^2*A*b^3 - 128*A*b^5 - 5*a^5*B - 80*a^3*b^2*B + 80*a*b^4*B + 45*a^4*b*C - 40*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[Sec[c + d*x]])/(15*a^5*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sec[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)) + (2*(12*a^2*A*b^2 - 8*A*b^4 - 9*a^3*b*B + 5*a*b^3*B + 6*a^4*C - 2*a^2*b^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sec[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^4*A - 71*a^2*A*b^2 + 48*A*b^4 + 50*a^3*b*B - 30*a*b^3*B - 35*a^4*C + 15*a^2*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)^2*d*Sec[c + d*x]^(3/2)) - (2*(14*a^4*A*b - 98*a^2*A*b^3 + 64*A*b^5 - 5*a^5*B + 65*a^3*b^2*B - 40*a*b^4*B - 40*a^4*b*C + 20*a^2*b^3*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^4*(a^2 - b^2)^2*d*Sqrt[Sec[c + d*x]])}


(* ::Subsection::Closed:: *)
(*Integrands of the form (A+B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/3)*)
(**)


{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(2/3), x, 1, Int[(a + b*Sec[c + d*x])^(2/3)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x]}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(a + b*Sec[c + d*x])^(1/3), x, 1, Int[(a + b*Sec[c + d*x])^(1/3)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x]}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(1/3), x, 0, Int[(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(1/3), x]}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(2/3), x, 0, Int[(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(a + b*Sec[c + d*x])^(2/3), x]}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^n*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 7, (2*(7*a*A + 9*b*B + 9*a*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(5*A*b + 5*a*B + 7*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(5*A*b + 5*a*B + 7*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(7*a*A + 9*b*B + 9*a*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(2*A*b + 9*a*B)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(63*d) + (2*A*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 6, (2*(3*A*b + 3*a*B + 5*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(5*a*A + 7*b*B + 7*a*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(5*a*A + 7*b*B + 7*a*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(2*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(35*d) + (2*A*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 5, (2*(3*a*A + 5*b*B + 5*a*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(A*b + a*B + 3*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(2*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(15*d) + (2*A*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 5, (2*(A*b + a*B - b*C)*EllipticE[(1/2)*(c + d*x), 2])/d + (2*(a*A + 3*b*B + 3*a*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(A - 3*C)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 5, (2*(a*A - b*B - a*C)*EllipticE[(1/2)*(c + d*x), 2])/d + (2*(3*A*b + 3*a*B + b*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(3*b*B + 2*a*C)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*C*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Cos[c + d*x]^(1/2), x, 6, -((2*(5*A*b + 5*a*B + 3*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(3*a*A + b*B + a*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(5*b*B + 2*a*C)*Sin[c + d*x])/(15*d*Cos[c + d*x]^(3/2)) + (2*(5*A*b + 5*a*B + 3*b*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*C*(a + b*Sec[c + d*x])*Sin[c + d*x])/(5*d*Cos[c + d*x]^(3/2))}
{((a + b*Sec[c + d*x])*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 7, -((2*(5*a*A + 3*b*B + 3*a*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(7*A*b + 7*a*B + 5*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(7*b*B + 2*a*C)*Sin[c + d*x])/(35*d*Cos[c + d*x]^(5/2)) + (2*(7*A*b + 7*a*B + 5*b*C)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*(5*a*A + 3*b*B + 3*a*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*C*(a + b*Sec[c + d*x])*Sin[c + d*x])/(7*d*Cos[c + d*x]^(5/2))}


{Cos[c + d*x]^(11/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 8, (2*(14*a*A*b + 7*a^2*B + 9*b^2*B + 18*a*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(45*a^2*A + 55*A*b^2 + 110*a*b*B + 55*a^2*C + 77*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(45*a^2*A + 55*A*b^2 + 110*a*b*B + 55*a^2*C + 77*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(14*a*A*b + 7*a^2*B + 9*b^2*B + 18*a*b*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45*d) + (2*(81*a^2*A + 8*A*b^2 + 121*a*b*B + 99*a^2*C)*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(693*d) + (2*(4*A*b + 11*a*B)*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(99*d) + (2*A*Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 7, (2*(7*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 15*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(10*a*A*b + 5*a^2*B + 7*b^2*B + 14*a*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(21*d) + (2*(49*a^2*A + 8*A*b^2 + 81*a*b*B + 63*a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(315*d) + (2*(4*A*b + 9*a*B)*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(63*d) + (2*A*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 6, (2*(6*a*A*b + 3*a^2*B + 5*b^2*B + 10*a*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(5*a^2*A + 7*A*b^2 + 14*a*b*B + 7*a^2*C + 21*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(25*a^2*A + 8*A*b^2 + 49*a*b*B + 35*a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(4*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(35*d) + (2*A*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 6, (2*(3*a^2*A + 5*A*b^2 + 10*a*b*B + 5*a^2*C - 5*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(2*a*A*b + a^2*B + 3*b^2*B + 6*a*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(7*A*b + 5*a*B - 15*b*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(4*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d) + (2*A*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 6, (2*(2*a*A*b + a^2*B - b^2*B - 2*a*b*C)*EllipticE[(1/2)*(c + d*x), 2])/d + (2*(a^2*A + 3*A*b^2 + 6*a*b*B + 3*a^2*C + b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(a*A - 3*b*B - 5*a*C)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) - (2*b*(A - C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 6, (2*(5*a^2*A - 5*A*b^2 - 10*a*b*B - 5*a^2*C - 3*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(6*a*A*b + 3*a^2*B + b^2*B + 2*a*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) + (2*(15*A*b^2 + 25*a*b*B + 8*a^2*C + 9*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(5*b*B + 4*a*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*C*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Cos[c + d*x]^(1/2), x, 7, -((2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d)) + (2*(21*a^2*A + 7*A*b^2 + 14*a*b*B + 7*a^2*C + 5*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(35*A*b^2 + 49*a*b*B + 8*a^2*C + 25*b^2*C)*Sin[c + d*x])/(105*d*Cos[c + d*x]^(3/2)) + (2*(10*a*A*b + 5*a^2*B + 3*b^2*B + 6*a*b*C)*Sin[c + d*x])/(5*d*Sqrt[Cos[c + d*x]]) + (2*(7*b*B + 4*a*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(35*d*Cos[c + d*x]^(3/2)) + (2*C*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(7*d*Cos[c + d*x]^(3/2))}
{((a + b*Sec[c + d*x])^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 8, -((2*(15*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 7*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(63*A*b^2 + 81*a*b*B + 8*a^2*C + 49*b^2*C)*Sin[c + d*x])/(315*d*Cos[c + d*x]^(5/2)) + (2*(14*a*A*b + 7*a^2*B + 5*b^2*B + 10*a*b*C)*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*(15*a^2*A + 9*A*b^2 + 18*a*b*B + 9*a^2*C + 7*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(9*b*B + 4*a*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(63*d*Cos[c + d*x]^(5/2)) + (2*C*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(9*d*Cos[c + d*x]^(5/2))}


{Cos[c + d*x]^(11/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 8, (2*(21*a^2*A*b + 9*A*b^3 + 7*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 15*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B + 55*a^3*C + 231*a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(45*a^3*A + 165*a*A*b^2 + 165*a^2*b*B + 77*b^3*B + 55*a^3*C + 231*a*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(1212*a^2*A*b + 48*A*b^3 + 539*a^3*B + 979*a*b^2*B + 1584*a^2*b*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3465*d) + (2*(81*a^2*A + 24*A*b^2 + 143*a*b*B + 99*a^2*C)*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(693*d) + (2*(6*A*b + 11*a*B)*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(99*d) + (2*A*Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 7, (2*(7*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 15*b^3*B + 9*a^3*C + 45*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(15*a^2*A*b + 7*A*b^3 + 5*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 21*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(176*a^2*A*b + 16*A*b^3 + 75*a^3*B + 171*a*b^2*B + 252*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(315*d) + (2*(49*a^2*A + 24*A*b^2 + 99*a*b*B + 63*a^2*C)*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(315*d) + (2*(2*A*b + 3*a*B)*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(21*d) + (2*A*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 7, (2*(9*a^2*A*b + 5*A*b^3 + 3*a^3*B + 15*a*b^2*B + 15*a^2*b*C - 5*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(5*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 21*b^3*B + 7*a^3*C + 63*a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) - (2*b*(25*a^2*A + 57*A*b^2 + 84*a*b*B + 35*a^2*C - 105*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) + (2*(25*a^2*A + 24*A*b^2 + 63*a*b*B + 35*a^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(105*d) + (2*(6*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(35*d) + (2*A*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 7, (2*(3*a^3*A + 15*a*A*b^2 + 15*a^2*b*B - 5*b^3*B + 5*a^3*C - 15*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(3*a^2*A*b + 3*A*b^3 + a^3*B + 9*a*b^2*B + 9*a^2*b*C + b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(12*a*A*b + 5*a^2*B - 15*b^2*B - 40*a*b*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) - (2*b*(9*A*b + 5*a*B - 5*b*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(6*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(15*d) + (2*A*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 7, (2*(15*a^2*A*b - 5*A*b^3 + 5*a^3*B - 15*a*b^2*B - 15*a^2*b*C - 3*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(a^3*A + 9*a*A*b^2 + 9*a^2*b*B + b^3*B + 3*a^3*C + 3*a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(5*a^2*A - 15*A*b^2 - 40*a*b*B - 33*a^2*C - 9*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) - (2*b*(5*a*A - 5*b*B - 9*a*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) - (2*b*(5*A - 3*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 7, (2*(5*a^3*A - 15*a*A*b^2 - 15*a^2*b*B - 3*b^3*B - 5*a^3*C - 9*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(63*a^2*A*b + 7*A*b^3 + 21*a^3*B + 21*a*b^2*B + 21*a^2*b*C + 5*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(280*a*A*b^2 + 231*a^2*b*B + 63*b^3*B + 48*a^3*C + 164*a*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) + (2*(35*A*b^2 + 63*a*b*B + 24*a^2*C + 25*b^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) + (2*(7*b*B + 6*a*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(35*d*Sqrt[Cos[c + d*x]]) + (2*C*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(7*d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Cos[c + d*x]^(1/2), x, 8, -((2*(45*a^2*A*b + 9*A*b^3 + 15*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 7*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(21*a^3*A + 21*a*A*b^2 + 21*a^2*b*B + 5*b^3*B + 7*a^3*C + 15*a*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(252*a*A*b^2 + 171*a^2*b*B + 75*b^3*B + 16*a^3*C + 176*a*b^2*C)*Sin[c + d*x])/(315*d*Cos[c + d*x]^(3/2)) + (2*(45*a^2*A*b + 9*A*b^3 + 15*a^3*B + 27*a*b^2*B + 27*a^2*b*C + 7*b^3*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(63*A*b^2 + 99*a*b*B + 24*a^2*C + 49*b^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(315*d*Cos[c + d*x]^(3/2)) + (2*(3*b*B + 2*a*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(21*d*Cos[c + d*x]^(3/2)) + (2*C*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(9*d*Cos[c + d*x]^(3/2))}
{((a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Cos[c + d*x]^(3/2), x, 9, -((2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B + 9*a^3*C + 21*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(231*a^2*A*b + 55*A*b^3 + 77*a^3*B + 165*a*b^2*B + 165*a^2*b*C + 45*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(1584*a*A*b^2 + 979*a^2*b*B + 539*b^3*B + 48*a^3*C + 1212*a*b^2*C)*Sin[c + d*x])/(3465*d*Cos[c + d*x]^(5/2)) + (2*(231*a^2*A*b + 55*A*b^3 + 77*a^3*B + 165*a*b^2*B + 165*a^2*b*C + 45*b^3*C)*Sin[c + d*x])/(231*d*Cos[c + d*x]^(3/2)) + (2*(15*a^3*A + 27*a*A*b^2 + 27*a^2*b*B + 7*b^3*B + 9*a^3*C + 21*a*b^2*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(99*A*b^2 + 143*a*b*B + 24*a^2*C + 81*b^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(693*d*Cos[c + d*x]^(5/2)) + (2*(11*b*B + 6*a*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(99*d*Cos[c + d*x]^(5/2)) + (2*C*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(11*d*Cos[c + d*x]^(5/2))}


{Cos[c + d*x]^(13/2)*(a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 9, (2*(77*a^4*A + 546*a^2*A*b^2 + 117*A*b^4 + 364*a^3*b*B + 468*a*b^3*B + 91*a^4*C + 702*a^2*b^2*C + 195*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(195*d) + (2*(180*a^3*A*b + 220*a*A*b^3 + 45*a^4*B + 330*a^2*b^2*B + 77*b^4*B + 220*a^3*b*C + 308*a*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(180*a^3*A*b + 220*a*A*b^3 + 45*a^4*B + 330*a^2*b^2*B + 77*b^4*B + 220*a^3*b*C + 308*a*b^3*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(5929*a^4*A + 25217*a^2*A*b^2 + 384*A*b^4 + 22763*a^3*b*B + 13351*a*b^3*B + 7007*a^4*C + 33319*a^2*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(45045*d) + (2*(2518*a^2*A*b + 192*A*b^3 + 1053*a^3*B + 2171*a*b^2*B + 3146*a^2*b*C)*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(9009*d) + (2*(121*a^2*A + 48*A*b^2 + 221*a*b*B + 143*a^2*C)*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(1287*d) + (2*(8*A*b + 13*a*B)*Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(143*d) + (2*A*Cos[c + d*x]^(11/2)*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(13*d)}
{Cos[c + d*x]^(11/2)*(a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 8, (2*(28*a^3*A*b + 36*a*A*b^3 + 7*a^4*B + 54*a^2*b^2*B + 15*b^4*B + 36*a^3*b*C + 60*a*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(45*a^4*A + 330*a^2*A*b^2 + 77*A*b^4 + 220*a^3*b*B + 308*a*b^3*B + 55*a^4*C + 462*a^2*b^2*C + 231*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(675*a^4*A + 3199*a^2*A*b^2 + 128*A*b^4 + 2761*a^3*b*B + 2057*a*b^3*B + 825*a^4*C + 4653*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3465*d) + (2*(1346*a^2*A*b + 192*A*b^3 + 539*a^3*B + 1353*a*b^2*B + 1782*a^2*b*C)*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3465*d) + (2*(27*a^2*A + 16*A*b^2 + 55*a*b*B + 33*a^2*C)*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(231*d) + (2*(8*A*b + 11*a*B)*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(99*d) + (2*A*Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(11*d)}
{Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 8, (2*(7*a^4*A + 54*a^2*A*b^2 + 15*A*b^4 + 36*a^3*b*B + 60*a*b^3*B + 9*a^4*C + 90*a^2*b^2*C - 15*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(20*a^3*A*b + 28*a*A*b^3 + 5*a^4*B + 42*a^2*b^2*B + 21*b^4*B + 28*a^3*b*C + 84*a*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) - (2*b*(251*a^2*A*b + 187*A*b^3 + 75*a^3*B + 423*a*b^2*B + 357*a^2*b*C - 315*b^3*C)*Sin[c + d*x])/(315*d*Sqrt[Cos[c + d*x]]) + (2*(202*a^2*A*b + 64*A*b^3 + 75*a^3*B + 261*a*b^2*B + 294*a^2*b*C)*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])*Sin[c + d*x])/(315*d) + (2*(49*a^2*A + 48*A*b^2 + 117*a*b*B + 63*a^2*C)*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(315*d) + (2*(8*A*b + 9*a*B)*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(63*d) + (2*A*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(9*d)}
{Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 8, (2*(12*a^3*A*b + 20*a*A*b^3 + 3*a^4*B + 30*a^2*b^2*B - 5*b^4*B + 20*a^3*b*C - 20*a*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(5*a^4*A + 42*a^2*A*b^2 + 21*A*b^4 + 28*a^3*b*B + 84*a*b^3*B + 7*a^4*C + 126*a^2*b^2*C + 7*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) - (2*b*(25*a^3*A + 141*a*A*b^2 + 119*a^2*b*B - 105*b^3*B + 35*a^3*C - 385*a*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) - (2*b*(25*a^2*A + 87*A*b^2 + 98*a*b*B + 35*a^2*C - 35*b^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) + (2*(25*a^2*A + 48*A*b^2 + 77*a*b*B + 35*a^2*C)*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(105*d) + (2*(8*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(35*d) + (2*A*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(7*d)}
{Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 8, (2*(3*a^4*A + 30*a^2*A*b^2 - 5*A*b^4 + 20*a^3*b*B - 20*a*b^3*B + 5*a^4*C - 30*a^2*b^2*C - 3*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(4*a^3*A*b + 12*a*A*b^3 + a^4*B + 18*a^2*b^2*B + b^4*B + 12*a^3*b*C + 4*a*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*d) - (2*b*(17*a^2*A*b - 15*A*b^3 + 5*a^3*B - 55*a*b^2*B - 73*a^2*b*C - 9*b^3*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) - (2*b*(14*a*A*b + 5*a^2*B - 5*b^2*B - 14*a*b*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) - (2*b*(11*A*b + 5*a*B - 3*b*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(8*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(15*d) + (2*A*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(5*d)}
{Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 8, (2*(20*a^3*A*b - 20*a*A*b^3 + 5*a^4*B - 30*a^2*b^2*B - 3*b^4*B - 20*a^3*b*C - 12*a*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*d) + (2*(7*a^4*A + 126*a^2*A*b^2 + 7*A*b^4 + 84*a^3*b*B + 28*a*b^3*B + 21*a^4*C + 42*a^2*b^2*C + 5*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) - (2*b*(35*a^3*A - 385*a*A*b^2 - 511*a^2*b*B - 63*b^3*B - 279*a^3*C - 227*a*b^2*C)*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) - (2*b*(35*a^2*A - 35*A*b^2 - 98*a*b*B - 87*a^2*C - 25*b^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) - (2*b*(35*a*A - 21*b*B - 39*a*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(105*d*Sqrt[Cos[c + d*x]]) - (2*b*(7*A - 3*C)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(21*d*Sqrt[Cos[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(3*d)}
{Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2), x, 8, (2*(15*a^4*A - 90*a^2*A*b^2 - 9*A*b^4 - 60*a^3*b*B - 36*a*b^3*B - 15*a^4*C - 54*a^2*b^2*C - 7*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d) + (2*(84*a^3*A*b + 28*a*A*b^3 + 21*a^4*B + 42*a^2*b^2*B + 5*b^4*B + 28*a^3*b*C + 20*a*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(21*d) + (2*(1533*a^2*A*b^2 + 189*A*b^4 + 837*a^3*b*B + 681*a*b^3*B + 128*a^4*C + 883*a^2*b^2*C + 147*b^4*C)*Sin[c + d*x])/(315*d*Sqrt[Cos[c + d*x]]) + (2*(294*a*A*b^2 + 261*a^2*b*B + 75*b^3*B + 64*a^3*C + 202*a*b^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(315*d*Sqrt[Cos[c + d*x]]) + (2*(63*A*b^2 + 117*a*b*B + 48*a^2*C + 49*b^2*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(315*d*Sqrt[Cos[c + d*x]]) + (2*(9*b*B + 8*a*C)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(63*d*Sqrt[Cos[c + d*x]]) + (2*C*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(9*d*Sqrt[Cos[c + d*x]])}
{((a + b*Sec[c + d*x])^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Cos[c + d*x]^(1/2), x, 9, -((2*(60*a^3*A*b + 36*a*A*b^3 + 15*a^4*B + 54*a^2*b^2*B + 7*b^4*B + 36*a^3*b*C + 28*a*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(15*d)) + (2*(231*a^4*A + 462*a^2*A*b^2 + 55*A*b^4 + 308*a^3*b*B + 220*a*b^3*B + 77*a^4*C + 330*a^2*b^2*C + 45*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(231*d) + (2*(4653*a^2*A*b^2 + 825*A*b^4 + 2057*a^3*b*B + 2761*a*b^3*B + 128*a^4*C + 3199*a^2*b^2*C + 675*b^4*C)*Sin[c + d*x])/(3465*d*Cos[c + d*x]^(3/2)) + (2*(60*a^3*A*b + 36*a*A*b^3 + 15*a^4*B + 54*a^2*b^2*B + 7*b^4*B + 36*a^3*b*C + 28*a*b^3*C)*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(1782*a*A*b^2 + 1353*a^2*b*B + 539*b^3*B + 192*a^3*C + 1346*a*b^2*C)*(a + b*Sec[c + d*x])*Sin[c + d*x])/(3465*d*Cos[c + d*x]^(3/2)) + (2*(33*A*b^2 + 55*a*b*B + 16*a^2*C + 27*b^2*C)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(231*d*Cos[c + d*x]^(3/2)) + (2*(11*b*B + 8*a*C)*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(99*d*Cos[c + d*x]^(3/2)) + (2*C*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(11*d*Cos[c + d*x]^(3/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]), x, 8, (2*(3*a^2*A + 5*A*b^2 - 5*a*b*B + 5*a^2*C)*EllipticE[(c + d*x)/2, 2])/(5*a^3*d) - (2*(a^2*A*b + 3*A*b^3 - a^3*B - 3*a*b^2*B + 3*a^2*b*C)*EllipticF[(c + d*x)/2, 2])/(3*a^4*d) + (2*b^2*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^4*(a + b)*d) - (2*(A*b - a*B)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*d) + (2*A*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*a*d)}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]), x, 7, (-2*(A*b - a*B)*EllipticE[(c + d*x)/2, 2])/(a^2*d) + (2*(a^2*A + 3*A*b^2 - 3*a*b*B + 3*a^2*C)*EllipticF[(c + d*x)/2, 2])/(3*a^3*d) - (2*b*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^3*(a + b)*d) + (2*A*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*d)}
{(Sqrt[Cos[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x]), x, 6, (2*A*EllipticE[(c + d*x)/2, 2])/(a*d) - (2*(A*b - a*B)*EllipticF[(c + d*x)/2, 2])/(a^2*d) + (2*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a^2*(a + b)*d)}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])), x, 7, (-2*C*EllipticE[(c + d*x)/2, 2])/(b*d) + (2*A*EllipticF[(c + d*x)/2, 2])/(a*d) - (2*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(a*b*(a + b)*d) + (2*C*Sin[c + d*x])/(b*d*Sqrt[Cos[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])), x, 8, (-2*(b*B - a*C)*EllipticE[(c + d*x)/2, 2])/(b^2*d) + (2*C*EllipticF[(c + d*x)/2, 2])/(3*b*d) + (2*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(b^2*(a + b)*d) + (2*C*Sin[c + d*x])/(3*b*d*Cos[c + d*x]^(3/2)) + (2*(b*B - a*C)*Sin[c + d*x])/(b^2*d*Sqrt[Cos[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])), x, 9, (-2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*EllipticE[(c + d*x)/2, 2])/(5*b^3*d) + (2*(b*B - a*C)*EllipticF[(c + d*x)/2, 2])/(3*b^2*d) - (2*a*(A*b^2 - a*b*B + a^2*C)*EllipticPi[(2*a)/(a + b), (c + d*x)/2, 2])/(b^3*(a + b)*d) + (2*C*Sin[c + d*x])/(5*b*d*Cos[c + d*x]^(5/2)) + (2*(b*B - a*C)*Sin[c + d*x])/(3*b^2*d*Cos[c + d*x]^(3/2)) + (2*(5*A*b^2 - 5*a*b*B + 5*a^2*C + 3*b^2*C)*Sin[c + d*x])/(5*b^3*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^2, x, 9, ((6*a^4*A + 24*a^2*A*b^2 - 35*A*b^4 - 20*a^3*b*B + 25*a*b^3*B + 10*a^4*C - 15*a^2*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(5*a^4*(a^2 - b^2)*d) - ((4*a^4*A*b + 20*a^2*A*b^3 - 21*A*b^5 - 2*a^5*B - 16*a^3*b^2*B + 15*a*b^4*B + 12*a^4*b*C - 9*a^2*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^5*(a^2 - b^2)*d) + (b^2*(9*a^2*A*b^2 - 7*A*b^4 - 7*a^3*b*B + 5*a*b^3*B + 5*a^4*C - 3*a^2*b^2*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^5*(a - b)*(a + b)^2*d) - ((4*a^2*A*b - 7*A*b^3 - 2*a^3*B + 5*a*b^2*B - 3*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)*d) + ((2*a^2*A - 7*A*b^2 + 5*a*b*B - 5*a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^2, x, 8, -(((4*a^2*A*b - 5*A*b^3 - 2*a^3*B + 3*a*b^2*B - a^2*b*C)*EllipticE[(1/2)*(c + d*x), 2])/(a^3*(a^2 - b^2)*d)) + ((2*a^4*A + 16*a^2*A*b^2 - 15*A*b^4 - 12*a^3*b*B + 9*a*b^3*B + 6*a^4*C - 3*a^2*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*a^4*(a^2 - b^2)*d) - (b*(7*a^2*A*b^2 - 5*A*b^4 - 5*a^3*b*B + 3*a*b^3*B + 3*a^4*C - a^2*b^2*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^4*(a - b)*(a + b)^2*d) + ((2*a^2*A - 5*A*b^2 + 3*a*b*B - 3*a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d) + ((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x]))}
{(Sqrt[Cos[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^2, x, 7, ((2*a^2*A - 3*A*b^2 + a*b*B - a^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(a^2*(a^2 - b^2)*d) - ((4*a^2*A*b - 3*A*b^3 - 2*a^3*B + a*b^2*B + a^2*b*C)*EllipticF[(1/2)*(c + d*x), 2])/(a^3*(a^2 - b^2)*d) + ((5*a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + a*b^3*B + a^4*C + a^2*b^2*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^3*(a - b)*(a + b)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2), x, 7, ((A*b^2 - a*b*B + a^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(a*b*(a^2 - b^2)*d) + ((2*a^2*A - A*b^2 - a*b*B + a^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(a^2*(a^2 - b^2)*d) - ((3*a^2*A*b^2 - A*b^4 - a^3*b*B - a*b^3*B - a^4*C + 3*a^2*b^2*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a^2*(a - b)*b*(a + b)^2*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2), x, 8, -(((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(b^2*(a^2 - b^2)*d)) - ((A*b^2 - a*b*B + a^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(a*b*(a^2 - b^2)*d) + ((a^2*A*b^2 + A*b^4 + a^3*b*B - 3*a*b^3*B - 3*a^4*C + 5*a^2*b^2*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(a*(a - b)*b^2*(a + b)^2*d) + ((A*b^2 - a*b*B + 3*a^2*C - 2*b^2*C)*Sin[c + d*x])/(b^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2), x, 9, ((a*A*b^2 - 3*a^2*b*B + 2*b^3*B + 5*a^3*C - 4*a*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(b^3*(a^2 - b^2)*d) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(3*b^2*(a^2 - b^2)*d) + ((a^2*A*b^2 - 3*A*b^4 - 3*a^3*b*B + 5*a*b^3*B + 5*a^4*C - 7*a^2*b^2*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/((a - b)*b^3*(a + b)^2*d) + ((3*A*b^2 - 3*a*b*B + 5*a^2*C - 2*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)) - ((a*A*b^2 - 3*a^2*b*B + 2*b^3*B + 5*a^3*C - 4*a*b^2*C)*Sin[c + d*x])/(b^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x]))}


(* {(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^3, x, 10, ((24*a^6*A + 192*a^4*A*b^2 - 561*a^2*A*b^4 + 315*A*b^6 - 120*a^5*b*B + 325*a^3*b^3*B - 175*a*b^5*B + 40*a^6*C - 145*a^4*b^2*C + 75*a^2*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(20*a^5*(a^2 - b^2)^2*d) - ((24*a^6*A*b + 192*a^4*A*b^3 - 387*a^2*A*b^5 + 189*A*b^7 - 8*a^7*B - 128*a^5*b^2*B + 223*a^3*b^4*B - 105*a*b^6*B + 72*a^6*b*C - 99*a^4*b^3*C + 45*a^2*b^5*C)*EllipticF[(1/2)*(c + d*x), 2])/(12*a^6*(a^2 - b^2)^2*d) + (b^2*(99*a^4*A*b^2 - 150*a^2*A*b^4 + 63*A*b^6 - 63*a^5*b*B + 86*a^3*b^3*B - 35*a*b^5*B + 35*a^6*C - 38*a^4*b^2*C + 15*a^2*b^4*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a^6*(a - b)^2*(a + b)^3*d) - ((24*a^4*A*b - 105*a^2*A*b^3 + 63*A*b^5 - 8*a^5*B + 61*a^3*b^2*B - 35*a*b^4*B - 33*a^4*b*C + 15*a^2*b^3*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*a^4*(a^2 - b^2)^2*d) + ((8*a^4*A - 101*a^2*A*b^2 + 63*A*b^4 + 65*a^3*b*B - 35*a*b^3*B - 45*a^4*C + 15*a^2*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(20*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((15*a^2*A*b^2 - 9*A*b^4 - 11*a^3*b*B + 5*a*b^3*B + 7*a^4*C - a^2*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))} *)
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^3, x, 9, -(((24*a^4*A*b - 65*a^2*A*b^3 + 35*A*b^5 - 8*a^5*B + 29*a^3*b^2*B - 15*a*b^4*B - 9*a^4*b*C + 3*a^2*b^3*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^4*(a^2 - b^2)^2*d)) + ((8*a^6*A + 128*a^4*A*b^2 - 223*a^2*A*b^4 + 105*A*b^6 - 72*a^5*b*B + 99*a^3*b^3*B - 45*a*b^5*B + 24*a^6*C - 15*a^4*b^2*C + 9*a^2*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(12*a^5*(a^2 - b^2)^2*d) - (b*(63*a^4*A*b^2 - 86*a^2*A*b^4 + 35*A*b^6 - 35*a^5*b*B + 38*a^3*b^3*B - 15*a*b^5*B + 15*a^6*C - 6*a^4*b^2*C + 3*a^2*b^4*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a^5*(a - b)^2*(a + b)^3*d) + ((8*a^4*A - 61*a^2*A*b^2 + 35*A*b^4 + 33*a^3*b*B - 15*a*b^3*B - 21*a^4*C + 3*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(12*a^3*(a^2 - b^2)^2*d) + ((A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((13*a^2*A*b^2 - 7*A*b^4 - 9*a^3*b*B + 3*a*b^3*B + 5*a^4*C + a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))}
{(Sqrt[Cos[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^3, x, 8, ((8*a^4*A - 29*a^2*A*b^2 + 15*A*b^4 + 9*a^3*b*B - 3*a*b^3*B - 5*a^4*C - a^2*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^3*(a^2 - b^2)^2*d) - ((24*a^4*A*b - 33*a^2*A*b^3 + 15*A*b^5 - 8*a^5*B + 5*a^3*b^2*B - 3*a*b^4*B + 7*a^4*b*C - a^2*b^3*C)*EllipticF[(1/2)*(c + d*x), 2])/(4*a^4*(a^2 - b^2)^2*d) + ((35*a^4*A*b^2 - 38*a^2*A*b^4 + 15*A*b^6 - 15*a^5*b*B + 6*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C + 10*a^4*b^2*C - a^2*b^4*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a^4*(a - b)^2*(a + b)^3*d) + ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2) + ((11*a^2*A*b^2 - 5*A*b^4 - 7*a^3*b*B + a*b^3*B + 3*a^4*C + 3*a^2*b^2*C)*Sin[c + d*x])/(4*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^3), x, 8, ((9*a^2*A*b^2 - 3*A*b^4 - 5*a^3*b*B - a*b^3*B + a^4*C + 5*a^2*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*a^2*b*(a^2 - b^2)^2*d) + ((8*a^4*A - 5*a^2*A*b^2 + 3*A*b^4 - 7*a^3*b*B + a*b^3*B + 3*a^4*C + 3*a^2*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(4*a^3*(a^2 - b^2)^2*d) - ((15*a^4*A*b^2 - 6*a^2*A*b^4 + 3*A*b^6 - 3*a^5*b*B - 10*a^3*b^3*B + a*b^5*B - a^6*C + 10*a^4*b^2*C + 3*a^2*b^4*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a^3*(a - b)^2*b*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^2) - ((7*a^2*A*b^2 - A*b^4 - 3*a^3*b*B - 3*a*b^3*B - a^4*C + 7*a^2*b^2*C)*Sin[c + d*x])/(4*a*b*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^3), x, 8, -(((5*a^2*A*b^2 + A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + 9*a^2*b^2*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*a*b^2*(a^2 - b^2)^2*d)) - ((7*a^2*A*b^2 - A*b^4 - 3*a^3*b*B - 3*a*b^3*B - a^4*C + 7*a^2*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(4*a^2*b*(a^2 - b^2)^2*d) + ((3*a^4*A*b^2 + 10*a^2*A*b^4 - A*b^6 + a^5*b*B - 10*a^3*b^3*B - 3*a*b^5*B + 3*a^6*C - 6*a^4*b^2*C + 15*a^2*b^4*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a^2*(a - b)^2*b^2*(a + b)^3*d) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^2) + ((5*a^2*A*b^2 + A*b^4 - a^3*b*B - 5*a*b^3*B - 3*a^4*C + 9*a^2*b^2*C)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^3), x, 9, ((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 15*a^4*C + 29*a^2*b^2*C - 8*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^3*(a^2 - b^2)^2*d) + ((3*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + 11*a^2*b^2*C)*EllipticF[(1/2)*(c + d*x), 2])/(4*a*b^2*(a^2 - b^2)^2*d) + ((a^4*A*b^2 - 10*a^2*A*b^4 - 3*A*b^6 + 3*a^5*b*B - 6*a^3*b^3*B + 15*a*b^5*B - 15*a^6*C + 38*a^4*b^2*C - 35*a^2*b^4*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*a*(a - b)^2*b^3*(a + b)^3*d) - ((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 15*a^4*C + 29*a^2*b^2*C - 8*b^4*C)*Sin[c + d*x])/(4*b^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^2) + ((3*a^2*A*b^2 + 3*A*b^4 + a^3*b*B - 7*a*b^3*B - 5*a^4*C + 11*a^2*b^2*C)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x]))}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^3), x, 10, ((3*a^3*A*b^2 - 9*a*A*b^4 - 15*a^4*b*B + 29*a^2*b^3*B - 8*b^5*B + 35*a^5*C - 65*a^3*b^2*C + 24*a*b^4*C)*EllipticE[(1/2)*(c + d*x), 2])/(4*b^4*(a^2 - b^2)^2*d) + ((3*a^2*A*b^2 - 21*A*b^4 - 15*a^3*b*B + 33*a*b^3*B + 35*a^4*C - 61*a^2*b^2*C + 8*b^4*C)*EllipticF[(1/2)*(c + d*x), 2])/(12*b^3*(a^2 - b^2)^2*d) + ((3*a^4*A*b^2 - 6*a^2*A*b^4 + 15*A*b^6 - 15*a^5*b*B + 38*a^3*b^3*B - 35*a*b^5*B + 35*a^6*C - 86*a^4*b^2*C + 63*a^2*b^4*C)*EllipticPi[(2*a)/(a + b), (1/2)*(c + d*x), 2])/(4*(a - b)^2*b^4*(a + b)^3*d) + ((3*a^2*A*b^2 - 21*A*b^4 - 15*a^3*b*B + 33*a*b^3*B + 35*a^4*C - 61*a^2*b^2*C + 8*b^4*C)*Sin[c + d*x])/(12*b^3*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)) - ((3*a^3*A*b^2 - 9*a*A*b^4 - 15*a^4*b*B + 29*a^2*b^3*B - 8*b^5*B + 35*a^5*C - 65*a^3*b^2*C + 24*a*b^4*C)*Sin[c + d*x])/(4*b^4*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]) - ((A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(2*b*(a^2 - b^2)*d*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^2) + ((a^2*A*b^2 + 5*A*b^4 + 3*a^3*b*B - 9*a*b^3*B - 7*a^4*C + 13*a^2*b^2*C)*Sin[c + d*x])/(4*b^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x]))}


(* ::Subsection::Closed:: *)
(*Integrands of the form Cos[c+d x]^(m/2) (A+B Sec[c+d x]+C Sec[c+d x]^2) (a+b Sec[c+d x])^(n/2)*)


(* ::Subsubsection::Closed:: *)
(*n>0*)


{Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(9/2), x, 10, (2*(a + b)*(147*a^4*A - 24*a^2*A*b^2 - 16*A*b^4 + 57*a^3*b*B + 24*a*b^3*B + 189*a^4*C - 42*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(36*a^4*A*b - 20*a^2*A*b^3 - 16*A*b^5 - 75*a^5*B + 51*a^3*b^2*B + 24*a*b^4*B + 42*a^4*b*C - 42*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (1/(315*a^3*d))*(2*(13*a^2*A*b + 8*A*b^3 + 75*a^3*B - 12*a*b^2*B + 21*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x]) + (1/(315*a^2*d))*(2*(49*a^2*A - 6*A*b^2 + 9*a*b*B + 63*a^2*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x]) + (2*(A*b + 9*a*B)*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(63*a*d) + (2*A*Cos[c + d*x]^(7/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(9*d)}
{Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(7/2), x, 9, (2*(a + b)*(19*a^2*A*b + 8*A*b^3 + 63*a^3*B - 14*a*b^2*B + 35*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 17*a^2*A*b^2 - 8*A*b^4 - 14*a^3*b*B + 14*a*b^3*B + 35*a^4*C - 35*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^2*A - 4*A*b^2 + 7*a*b*B + 35*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a^2*d) + (2*(A*b + 7*a*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*a*d) + (2*A*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*d)}
{Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(5/2), x, 8, (2*(a + b)*(9*a^2*A - 2*A*b^2 + 5*a*b*B + 15*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*a^2*A*b - 2*A*b^3 - 5*a^3*B + 5*a*b^2*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a*d) + (2*A*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*d)}
{Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(3/2), x, 10, (2*(a + b)*(A*b + 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - A*b^2 + 3*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d)}
{Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(1/2), x, 10, ((a + b)*(2*A - C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*a*B + b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*b*B + a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (C*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]])}
{Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Cos[c + d*x]^(1/2), x, 11, -((a + b)*(4*b*B + a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(4*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((8*a*A + 4*b*B + 3*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((8*A*b^2 + 4*a*b*B - a^2*C + 4*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(4*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (C*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*d*Cos[c + d*x]^(3/2)) + ((4*b*B + a*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b*d*Sqrt[Cos[c + d*x]])}
{Sqrt[a + b*Sec[c + d*x]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Cos[c + d*x]^(3/2), x, 12, -((a + b)*(24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(24*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((24*A*b^2 + 18*a*b*B - a^2*C + 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(24*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((8*a*A*b^2 - 2*a^2*b*B + 8*b^3*B + a^3*C + 4*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(8*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (C*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Cos[c + d*x]^(5/2)) + ((6*b*B + a*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*b*d*Cos[c + d*x]^(3/2)) + ((24*A*b^2 + 6*a*b*B - 3*a^2*C + 16*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*b^2*d*Sqrt[Cos[c + d*x]])}


{(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(9/2), x, 10, (2*(a + b)*(147*a^4*A + 33*a^2*A*b^2 + 8*A*b^4 + 246*a^3*b*B - 18*a*b^3*B + 189*a^4*C + 63*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(39*a^4*A*b - 31*a^2*A*b^3 - 8*A*b^5 + 75*a^5*B - 93*a^3*b^2*B + 18*a*b^4*B + 63*a^4*b*C - 63*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(88*a^2*A*b - 4*A*b^3 + 75*a^3*B + 9*a*b^2*B + 126*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a^2*d) + (2*(49*a^2*A + 3*A*b^2 + 72*a*b*B + 63*a^2*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d) + (2*(A*b + 3*a*B)*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(21*d) + (2*A*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(9*d)}
{(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(7/2), x, 9, (2*(a + b)*(82*a^2*A*b - 6*A*b^3 + 63*a^3*B + 21*a*b^2*B + 140*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 31*a^2*A*b^2 + 6*A*b^4 + 21*a^3*b*B - 21*a*b^3*B + 35*a^4*C - 35*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^2*A + 3*A*b^2 + 42*a*b*B + 35*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a*d) + (2*(3*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*d) + (2*A*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(7*d)}
{(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(5/2), x, 11, (2*(a + b)*(9*a^2*A + 3*A*b^2 + 20*a*b*B + 15*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2*A*b - 3*A*b^3 + 5*a^3*B - 5*a*b^2*B + 15*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*A*b + 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d) + (2*A*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(5*d)}
{(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(3/2), x, 11, ((a + b)*(8*A*b + 6*a*B - 3*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*a^2*A - 2*A*b^2 + 6*a*b*B + 6*a^2*C + 3*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(2*b*B + 3*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (b*(2*A - 3*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d)}
{(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(1/2), x, 11, ((a + b)*(8*a*A - 4*b*B - 5*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((8*a*A*b + 8*a^2*B + 4*b^2*B + 7*a*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((8*A*b^2 + 12*a*b*B + 3*a^2*C + 4*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*b*B + 3*a*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[Cos[c + d*x]]) + (C*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(2*d*Sqrt[Cos[c + d*x]])}
{(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Cos[c + d*x]^(1/2), x, 12, -((a + b)*(24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(24*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^2*A + 24*A*b^2 + 42*a*b*B + 17*a^2*C + 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((24*a*A*b^2 + 6*a^2*b*B + 8*b^3*B - a^3*C + 12*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(8*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*b*B + a*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*d*Cos[c + d*x]^(3/2)) + ((24*A*b^2 + 30*a*b*B + 3*a^2*C + 16*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*b*d*Sqrt[Cos[c + d*x]]) + (C*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d*Cos[c + d*x]^(3/2))}
{(a + b*Sec[c + d*x])^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Cos[c + d*x]^(3/2), x, 13, -((a + b)*(240*a*A*b^2 + 24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(192*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((336*a*A*b^2 + 136*a^2*b*B + 128*b^3*B - 3*a^3*C + 228*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(192*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((48*a^2*A*b^2 + 64*A*b^4 - 8*a^3*b*B + 96*a*b^3*B + 3*a^4*C + 24*a^2*b^2*C + 48*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(64*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((8*b*B + 3*a*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d*Cos[c + d*x]^(5/2)) + ((48*A*b^2 + 56*a*b*B + 3*a^2*C + 36*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(96*b*d*Cos[c + d*x]^(3/2)) + ((240*a*A*b^2 + 24*a^2*b*B + 128*b^3*B - 9*a^3*C + 156*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(192*b^2*d*Sqrt[Cos[c + d*x]]) + (C*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(4*d*Cos[c + d*x]^(5/2))}


{(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(11/2), x, 11, (2*(a + b)*(3705*a^4*A*b + 255*a^2*A*b^3 + 40*A*b^5 + 1617*a^5*B + 3069*a^3*b^2*B - 110*a*b^4*B + 4785*a^4*b*C + 495*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3465*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(675*a^6*A - 390*a^4*A*b^2 - 245*a^2*A*b^4 - 40*A*b^6 + 1254*a^5*b*B - 1364*a^3*b^3*B + 110*a*b^5*B + 825*a^6*C - 330*a^4*b^2*C - 495*a^2*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3465*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(675*a^4*A + 1025*a^2*A*b^2 - 20*A*b^4 + 1793*a^3*b*B + 55*a*b^3*B + 825*a^4*C + 1485*a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3465*a^2*d) + (2*(1145*a^2*A*b + 15*A*b^3 + 539*a^3*B + 825*a*b^2*B + 1485*a^2*b*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3465*a*d) + (2*(27*a^2*A + 5*A*b^2 + 44*a*b*B + 33*a^2*C)*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(231*d) + (2*(5*A*b + 11*a*B)*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(99*d) + (2*A*Cos[c + d*x]^(9/2)*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(11*d)}
{(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(9/2), x, 10, (2*(a + b)*(147*a^4*A + 279*a^2*A*b^2 - 10*A*b^4 + 435*a^3*b*B + 45*a*b^3*B + 189*a^4*C + 483*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(114*a^4*A*b - 124*a^2*A*b^3 + 10*A*b^5 + 75*a^5*B - 30*a^3*b^2*B - 45*a*b^4*B + 168*a^4*b*C - 168*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(315*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(163*a^2*A*b + 5*A*b^3 + 75*a^3*B + 135*a*b^2*B + 231*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*a*d) + (2*(49*a^2*A + 15*A*b^2 + 90*a*b*B + 63*a^2*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(315*d) + (2*(5*A*b + 9*a*B)*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(63*d) + (2*A*Cos[c + d*x]^(7/2)*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(9*d)}
{(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(7/2), x, 12, (2*(a + b)*(145*a^2*A*b + 15*A*b^3 + 63*a^3*B + 161*a*b^2*B + 245*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^4*A - 10*a^2*A*b^2 - 15*A*b^4 + 56*a^3*b*B - 56*a*b^3*B + 35*a^4*C + 70*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b^3*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^2*A + 15*A*b^2 + 56*a*b*B + 35*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*d) + (2*(5*A*b + 7*a*B)*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(35*d) + (2*A*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(7*d)}
{(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(5/2), x, 12, ((a + b)*(18*a^2*A + 46*A*b^2 + 70*a*b*B + 30*a^2*C - 15*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((16*a^2*A*b - 16*A*b^3 + 10*a^3*B + 20*a*b^2*B + 60*a^2*b*C + 15*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b^2*(2*b*B + 5*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (b*(16*A*b + 10*a*B - 15*b*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*d*Sqrt[Cos[c + d*x]]) + (2*(A*b + a*B)*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(3*d) + (2*A*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(5*d)}
{(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(3/2), x, 12, ((a + b)*(56*a*A*b + 24*a^2*B - 12*b^2*B - 27*a*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((8*a^3*A + 16*a*A*b^2 + 48*a^2*b*B + 12*b^3*B + 24*a^3*C + 33*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(12*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (b*(8*A*b^2 + 20*a*b*B + 15*a^2*C + 4*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (1/2)*(c + d*x), (2*a)/(a + b)])/(4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (b*(8*a*A - 12*b*B - 21*a*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(12*d*Sqrt[Cos[c + d*x]]) - (b*(4*A - 3*C)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(6*d*Sqrt[Cos[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(3*d)}
{(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*Cos[c + d*x]^(1/2), x, 12, ((a + b)*(48*a^2*A - 24*A*b^2 - 54*a*b*B - 33*a^2*C - 16*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((96*a^2*A*b + 24*A*b^3 + 48*a^3*B + 66*a*b^2*B + 59*a^2*b*C + 16*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(24*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((40*a*A*b^2 + 30*a^2*b*B + 8*b^3*B + 5*a^3*C + 20*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(8*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((24*A*b^2 + 42*a*b*B + 15*a^2*C + 16*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(24*d*Sqrt[Cos[c + d*x]]) + ((6*b*B + 5*a*C)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(12*d*Sqrt[Cos[c + d*x]]) + (C*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]])}
{(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Cos[c + d*x]^(1/2), x, 13, -((a + b)*(432*a*A*b^2 + 264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(192*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((384*a^3*A + 528*a*A*b^2 + 472*a^2*b*B + 128*b^3*B + 133*a^3*C + 356*a*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(192*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((240*a^2*A*b^2 + 64*A*b^4 + 40*a^3*b*B + 160*a*b^3*B - 5*a^4*C + 120*a^2*b^2*C + 48*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(64*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((16*A*b^2 + 24*a*b*B + 5*a^2*C + 12*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(32*d*Cos[c + d*x]^(3/2)) + ((432*a*A*b^2 + 264*a^2*b*B + 128*b^3*B + 15*a^3*C + 284*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(192*b*d*Sqrt[Cos[c + d*x]]) + ((8*b*B + 5*a*C)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(24*d*Cos[c + d*x]^(3/2)) + (C*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(4*d*Cos[c + d*x]^(3/2))}
{(a + b*Sec[c + d*x])^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/Cos[c + d*x]^(3/2), x, 14, -((a + b)*(2640*a^2*A*b^2 + 1280*A*b^4 + 150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(1920*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4720*a^2*A*b^2 + 1280*A*b^4 + 1330*a^3*b*B + 3560*a*b^3*B - 15*a^4*C + 3236*a^2*b^2*C + 1024*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(1920*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((80*a^3*A*b^2 + 320*a*A*b^4 - 10*a^4*b*B + 240*a^2*b^3*B + 96*b^5*B + 3*a^5*C + 40*a^3*b^2*C + 240*a*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(128*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((80*A*b^2 + 110*a*b*B + 15*a^2*C + 64*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(240*d*Cos[c + d*x]^(5/2)) + ((1040*a*A*b^2 + 590*a^2*b*B + 360*b^3*B + 15*a^3*C + 772*a*b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(960*b*d*Cos[c + d*x]^(3/2)) + ((2640*a^2*A*b^2 + 1280*A*b^4 + 150*a^3*b*B + 2840*a*b^3*B - 45*a^4*C + 1692*a^2*b^2*C + 1024*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(1920*b^2*d*Sqrt[Cos[c + d*x]]) + ((2*b*B + a*C)*(a + b*Sec[c + d*x])^(3/2)*Sin[c + d*x])/(8*d*Cos[c + d*x]^(5/2)) + (C*(a + b*Sec[c + d*x])^(5/2)*Sin[c + d*x])/(5*d*Cos[c + d*x]^(5/2))}


(* ::Subsubsection::Closed:: *)
(*n<0*)


{(Cos[c + d*x]^(7/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sqrt[a + b*Sec[c + d*x]], x, 9, -((2*(a + b)*(44*a^2*A*b + 48*A*b^3 - 63*a^3*B - 56*a*b^2*B + 70*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (2*(25*a^4*A + 32*a^2*A*b^2 + 48*A*b^4 - 49*a^3*b*B - 56*a*b^3*B + 35*a^4*C + 70*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(105*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(25*a^2*A + 24*A*b^2 - 28*a*b*B + 35*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(105*a^3*d) - (2*(6*A*b - 7*a*B)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(35*a^2*d) + (2*A*Cos[c + d*x]^(5/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(7*a*d)}
{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sqrt[a + b*Sec[c + d*x]], x, 8, (2*(a + b)*(9*a^2*A + 8*A*b^2 - 10*a*b*B + 15*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(7*a^2*A*b + 8*A*b^3 - 5*a^3*B - 10*a*b^2*B + 15*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(4*A*b - 5*a*B)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^2*d) + (2*A*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a*d)}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sqrt[a + b*Sec[c + d*x]], x, 7, (-2*(a + b)*(2*A*b - 3*a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A + 2*A*b^2 - 3*a*b*B + 3*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a*d)}
{(Cos[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sqrt[a + b*Sec[c + d*x]], x, 9, (2*A*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(1/2)*Sqrt[a + b*Sec[c + d*x]]), x, 10, -(((a + b)*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + ((2*A + C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*b*B - a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (C*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b*d*Sqrt[Cos[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]), x, 11, -((a + b)*(4*b*B - 3*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(4*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((4*b*B - a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(4*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((8*A*b^2 - 4*a*b*B + 3*a^2*C + 4*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(4*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (C*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(2*b*d*Cos[c + d*x]^(3/2)) + ((4*b*B - 3*a*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(4*b^2*d*Sqrt[Cos[c + d*x]])}

{(Cos[c + d*x]^(1/2)*(a*A + (A*b + a*B)*Sec[c + d*x] + b*B*Sec[c + d*x]^2))/Sqrt[a + b*Sec[c + d*x]], x, 9, (2*A*(a + b)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*a*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*b*B*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(3/2), x, 9, (2*(9*a^4*A + 24*a^2*A*b^2 - 48*A*b^4 - 25*a^3*b*B + 40*a*b^3*B + 15*a^4*C - 30*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^4*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(12*a^2*A*b + 48*A*b^3 - 5*a^3*B - 40*a*b^2*B + 30*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(15*a^4*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(9*a^2*A*b - 24*A*b^3 - 5*a^3*B + 20*a*b^2*B - 15*a^2*b*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)*d) + (2*(a^2*A - 6*A*b^2 + 5*a*b*B - 5*a^2*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(5*a^2*(a^2 - b^2)*d)}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(3/2), x, 8, (-2*(5*a^2*A*b - 8*A*b^3 - 3*a^3*B + 6*a*b^2*B - 3*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a^3*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A + 8*A*b^2 - 6*a*b*B + 3*a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^2*A - 4*A*b^2 + 3*a*b*B - 3*a^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)*d)}
{(Cos[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(3/2), x, 7, (2*(a^2*A - 2*A*b^2 + a*b*B - a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(a^2*(a - b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(2*A*b - a*B)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(a^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(3/2)), x, 10, (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(a*(a - b)*b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*A*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(a*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)), x, 11, -(((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/((a - b)*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])) + (C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(b*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*b*B - 3*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b^2 - 2*a*b*B + 3*a^2*C - b^2*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(b^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]])}


{(Cos[c + d*x]^(5/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(5/2), x, 10, (2*(9*a^6*A + 55*a^4*A*b^2 - 212*a^2*A*b^4 + 128*A*b^6 - 40*a^5*b*B + 140*a^3*b^3*B - 80*a*b^5*B + 15*a^6*C - 75*a^4*b^2*C + 40*a^2*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(15*a^5*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(17*a^4*A*b + 116*a^2*A*b^3 - 128*A*b^5 - 5*a^5*B - 80*a^3*b^2*B + 80*a*b^4*B + 45*a^4*b*C - 40*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(15*a^5*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(12*a^2*A*b^2 - 8*A*b^4 - 9*a^3*b*B + 5*a*b^3*B + 6*a^4*C - 2*a^2*b^2*C)*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) - (2*(14*a^4*A*b - 98*a^2*A*b^3 + 64*A*b^5 - 5*a^5*B + 65*a^3*b^2*B - 40*a*b^4*B - 40*a^4*b*C + 20*a^2*b^3*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^4*(a^2 - b^2)^2*d) + (2*(3*a^4*A - 71*a^2*A*b^2 + 48*A*b^4 + 50*a^3*b*B - 30*a*b^3*B - 35*a^4*C + 15*a^2*b^2*C)*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(15*a^3*(a^2 - b^2)^2*d)}
{(Cos[c + d*x]^(3/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(5/2), x, 9, (-2*(8*a^4*A*b - 28*a^2*A*b^3 + 16*A*b^5 - 3*a^5*B + 15*a^3*b^2*B - 8*a*b^4*B - 6*a^4*b*C + 2*a^2*b^3*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a^4*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4*A + 16*a^2*A*b^2 - 16*A*b^4 - 9*a^3*b*B + 8*a*b^3*B + 3*a^4*C - 2*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a^4*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^(3/2)) + (2*(10*a^2*A*b^2 - 6*A*b^4 - 7*a^3*b*B + 3*a*b^3*B + 4*a^4*C)*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[a + b*Sec[c + d*x]]) + (2*(a^4*A - 13*a^2*A*b^2 + 8*A*b^4 + 8*a^3*b*B - 4*a*b^3*B - 5*a^4*C + a^2*b^2*C)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*a^3*(a^2 - b^2)^2*d)}
{(Cos[c + d*x]^(1/2)*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + b*Sec[c + d*x])^(5/2), x, 8, (2*(3*a^4*A - 15*a^2*A*b^2 + 8*A*b^4 + 6*a^3*b*B - 2*a*b^3*B - 3*a^4*C - a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a^3*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(9*a^2*A*b - 8*A*b^3 - 3*a^3*B + 2*a*b^2*B + a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a^3*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) + (2*(8*a^2*A*b^2 - 4*A*b^4 - 5*a^3*b*B + a*b^3*B + 2*a^4*C + 2*a^2*b^2*C)*Sin[c + d*x])/(3*a^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(1/2)*(a + b*Sec[c + d*x])^(5/2)), x, 8, (2*(6*a^2*A*b - 2*A*b^3 - 3*a^3*B - a*b^2*B + 4*a^2*b*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^2*(a - b)^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*(3*a^2*A - 2*A*b^2 - a*b*B + a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(1/2)*(c + d*x), (2*a)/(a + b)])/(3*a^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*(a + b*Sec[c + d*x])^(3/2)) - (2*(5*a^2*A*b^2 - A*b^4 - 2*a^3*b*B - 2*a*b^3*B - a^4*C + 5*a^2*b^2*C)*Sin[c + d*x])/(3*a*b*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(5/2)), x, 11, (-2*(3*a^2*A*b^2 + A*b^4 - 4*a*b^3*B - 3*a^4*C + 7*a^2*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*a*(a - b)^2*b^2*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*a*b*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + (2*C*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*Cos[c + d*x]^(3/2)*(a + b*Sec[c + d*x])^(3/2)) + (2*(3*a^2*A*b^2 + A*b^4 - 4*a*b^3*B - 3*a^4*C + 7*a^2*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]])}
{(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)/(Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(5/2)), x, 12, ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticE[(c + d*x)/2, (2*a)/(a + b)])/(3*(a - b)^2*b^3*(a + b)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*A*b^2 - 2*a*b*B + 5*a^2*C - 3*b^2*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*a)/(a + b)])/(3*b^2*(a^2 - b^2)*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) + ((2*b*B - 5*a*C)*Sqrt[(b + a*Cos[c + d*x])/(a + b)]*EllipticPi[2, (c + d*x)/2, (2*a)/(a + b)])/(b^3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Sec[c + d*x]]) - (2*(A*b^2 - a*b*B + a^2*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*Cos[c + d*x]^(5/2)*(a + b*Sec[c + d*x])^(3/2)) + (2*(a^2*A*b^2 + 3*A*b^4 + 2*a^3*b*B - 6*a*b^3*B - 5*a^4*C + 9*a^2*b^2*C)*Sin[c + d*x])/(3*b^2*(a^2 - b^2)^2*d*Cos[c + d*x]^(3/2)*Sqrt[a + b*Sec[c + d*x]]) - ((8*A*b^4 + 6*a^3*b*B - 14*a*b^3*B - 15*a^4*C + 26*a^2*b^2*C - 3*b^4*C)*Sqrt[a + b*Sec[c + d*x]]*Sin[c + d*x])/(3*b^3*(a^2 - b^2)^2*d*Sqrt[Cos[c + d*x]])}
